1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
From c299ddd4b39395c5b2b0090fa627f05a89d387ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= <nemeth@numbertext.org>
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.1
|