| 
1
2
3
4
5
6
7
8
9
10
11 | 
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 -> espacefrom ..echo import echo | 
| 
245
246
247
248
249
250
251
252
253254
255 | 
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)                    #echo("{}  -->  {}".format(zRgx.pattern, sRep))return sText                    #echo(sText) |