From c299ddd4b39395c5b2b0090fa627f05a89d387ee Mon Sep 17 00:00:00 2001 From: László Németh Date: Wed, 11 Sep 2019 10:06:05 +0200 Subject: tdf#127315 fix build with Python 3.7 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." --- pythonpath/lightproof_compile___implname__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3