Grammalecte  Check-in [a1f7ca28ad]

Overview
Comment:[build] remove useless echo lines
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: a1f7ca28ad30f6e2f17c097a7a649d492c6dbf398a2f57c80cf0f60eab8c6bbe
User & Date: olr on 2017-12-26 17:53:46
Other Links: manifest | tags
Context
2017-12-26
18:23
[fr] confusion <veillez/veuillez> check-in: 76236ca655 user: olr tags: trunk, fr
17:53
[build] remove useless echo lines check-in: a1f7ca28ad user: olr tags: trunk, build
15:02
[build] build graphspell dictionary if not found check-in: 834a8e771b user: olr tags: trunk, build
Changes

Modified gc_lang/fr/modules/textformatter.py from [a7ee2e0921] to [f190943db7].

1
2
3
4
5
6
7
8
9
10
11
#!python3

import re
from ..echo import echo


dReplTable = {
    # surnumerary_spaces
    "start_of_paragraph":          [("^[  ]+", "")],
    "end_of_paragraph":            [("[  ]+$", "")],
    "between_words":               [("  |  ", " "),  # espace + espace insécable -> espace



<







1
2
3

4
5
6
7
8
9
10
#!python3

import re



dReplTable = {
    # surnumerary_spaces
    "start_of_paragraph":          [("^[  ]+", "")],
    "end_of_paragraph":            [("[  ]+$", "")],
    "between_words":               [("  |  ", " "),  # espace + espace insécable -> espace
245
246
247
248
249
250
251
252
253
254
255
            for i, t in enumerate(lTup):
                lTup[i] = (re.compile(t[0]), t[1])

    def formatText (self, sText, **args):
        for sOptName, bVal in lOptRepl:
            if bVal:
                for zRgx, sRep in dReplTable[sOptName]:
                    #echo("{}  -->  {}".format(zRgx.pattern, sRep))
                    sText = zRgx.sub(sRep, sText)
                    #echo(sText)
        return sText







<

<

244
245
246
247
248
249
250

251

252
            for i, t in enumerate(lTup):
                lTup[i] = (re.compile(t[0]), t[1])

    def formatText (self, sText, **args):
        for sOptName, bVal in lOptRepl:
            if bVal:
                for zRgx, sRep in dReplTable[sOptName]:

                    sText = zRgx.sub(sRep, sText)

        return sText