Index: compile_rules.py ================================================================== --- compile_rules.py +++ compile_rules.py @@ -137,11 +137,11 @@ def createRule (s, nIdLine, sLang, bParagraph, dOptPriority): "returns rule as list [option name, regex, bCaseInsensitive, identifier, list of actions]" global dJSREGEXES - sLineId = "#" + str(nIdLine) + ("p" if bParagraph else "s") + sLineId = f"#{nIdLine}" + ("p" if bParagraph else "s") sRuleId = sLineId #### GRAPH CALL if s.startswith("@@@@"): if bParagraph: @@ -148,11 +148,11 @@ print("Error. Graph call can be made only after the first pass (sentence by sentence)") exit() return ["@@@@", s[4:], sLineId] #### OPTIONS - sOption = False # False or [a-z0-9]+ name + sOption = "" # empty string or [a-z0-9]+ name nPriority = 4 # Default is 4, value must be between 0 and 9 tGroups = None # code for groups positioning (only useful for JavaScript) cCaseMode = 'i' # i: case insensitive, s: case sensitive, u: uppercasing allowed cWordLimitLeft = '[' # [: word limit, <: no specific limit cWordLimitRight = ']' # ]: word limit, >: no specific limit @@ -159,28 +159,28 @@ m = re.match("^__(?P[\\[<]\\w[\\]>])(?P