Grammalecte  Diff

Differences From Artifact [a7ee2e0921]:

To Artifact [f190943db7]:


1
2
3
4
5
6
7
8
9
1
2
3

4
5
6
7
8



-





#!python3

import re
from ..echo import echo


dReplTable = {
    # surnumerary_spaces
    "start_of_paragraph":          [("^[  ]+", "")],
247
248
249
250
251
252
253
254
255
246
247
248
249
250

251

252





-

-


    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