diff options
author | László Németh <nemeth@numbertext.org> | 2019-09-11 10:06:05 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-09-11 10:22:35 +0200 |
commit | c299ddd4b39395c5b2b0090fa627f05a89d387ee (patch) | |
tree | 3638ca9fd87eac959313399167ad01abf3a679b5 | |
parent | 7b0fa973201c065363206f695ed17c209d16a5d1 (diff) |
tdf#127315 fix build with Python 3.7HEADmaster
Replace \d, \s, \w, \W with \\d, \\s, \\w and \\W
in name definitions to support
re.sub(name, name_definition, rule) during compiling.
Note: Related to the re.sub change "Unknown escapes in
repl consisting of '\' and an ASCII letter now are
errors."
-rw-r--r-- | pythonpath/lightproof_compile___implname__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pythonpath/lightproof_compile___implname__.py b/pythonpath/lightproof_compile___implname__.py index c3d1e53..c56c928 100644 --- a/pythonpath/lightproof_compile___implname__.py +++ b/pythonpath/lightproof_compile___implname__.py @@ -97,7 +97,7 @@ def mysplit(s, line, oldline, debug): if s2[0:1] == '"' and s2[-1:]=='"': s2 = s2[1:-1] if dec==1: - repl[s1] = s2 + repl[s1] = re.sub(r"\\([dswW])", r"\\\\\1", s2) return None else: for i in repl: |