Fix the fix for python 2 and 3 compatibility.

Really remove the "r" prefix.
This commit is contained in:
Günter Milde 2017-05-11 16:30:10 +02:00
parent 6afd654bb6
commit 2488bf6eaa

View File

@ -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()