From: Günter Milde Date: Thu, 11 May 2017 14:30:10 +0000 (+0200) Subject: Fix the fix for python 2 and 3 compatibility. X-Git-Tag: 2.3.0beta1~434 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2488bf6eaa157111bc97f72dedc326c80f089b9c;p=features.git Fix the fix for python 2 and 3 compatibility. Really remove the "r" prefix. --- 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()