From 2488bf6eaa157111bc97f72dedc326c80f089b9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Thu, 11 May 2017 16:30:10 +0200 Subject: [PATCH] Fix the fix for python 2 and 3 compatibility. Really remove the "r" prefix. --- lib/scripts/lyxpreview2bitmap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 094e8f915b..1848366a4f 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -163,7 +163,8 @@ def extract_metrics_info(dvipng_stdout): def fix_latex_file(latex_file, pdf_output): # python 2 does not allow to declare a string as raw byte so we double # the backslashes and remove the r preffix - def_re = re.compile(rb"(\\\\newcommandx|\\\\global\\\\long\\\\def)(\\\\[a-zA-Z]+)") + def_re = re.compile(b"(\\\\newcommandx|\\\\global\\\\long\\\\def)" + b"(\\\\[a-zA-Z]+)") tmp = mkstemp() -- 2.39.5