From 0bb50cd296dc4a0f8e3117d786831237e3213d68 Mon Sep 17 00:00:00 2001 From: Pierre Thibault Date: Fri, 2 Mar 2018 22:36:36 +0000 Subject: [PATCH] Regex fix to replace correctly quotes that contain apostrophes --- lib/doconce/doconce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/doconce/doconce.py b/lib/doconce/doconce.py index a22e4e8b..ad2686a5 100644 --- a/lib/doconce/doconce.py +++ b/lib/doconce/doconce.py @@ -4103,7 +4103,7 @@ def inline_tag_subst(filestr, format): # Do tags that require almost format-independent treatment such # that everything is conveniently defined here # 1. Quotes around normal text in LaTeX style: - pattern = "``([^']+?)''" # here we had [A-Za-z][lots of chars]*?, but ^' is much smarter and mathces locale chars too + pattern = "``(.+?)''" if format in ('html',): filestr = re.sub(pattern, '"\g<1>"', filestr) elif format not in ('pdflatex', 'latex'):