]> git.lyx.org Git - features.git/commitdiff
Fix Python escaping of unicode string
authorScott Kostyshak <skostysh@lyx.org>
Tue, 26 Dec 2017 07:03:06 +0000 (02:03 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 26 Dec 2017 07:10:49 +0000 (02:10 -0500)
When removing "r" from "ur", it is needed to add extra backslashes.
See:

  https://www.mail-archive.com/search?l=mid&q=2024193.iXIh6cq6L3%40myth

Thanks to José.

This commit amends b7983478 (and thus 586d16a4).

lib/lyx2lyx/lyx_2_3.py

index d0481ae8ff22161fc36dad6c183f23d146750b3c..140f57fb36bd14e1f663dd531d9d5d0a9aa1811f 100644 (file)
@@ -1875,7 +1875,7 @@ def convert_dashligatures(document):
                          flags=re.UNICODE):
                 has_literal_dashes = True
             # ligature dash followed by word or no-break space on next line:
-            if re.search(u"(\\twohyphens|\\threehyphens)", line,
+            if re.search(u"(\\\\twohyphens|\\\\threehyphens)", line,
                             flags=re.UNICODE) and re.match(u"[\w\u00A0]",
                             document.body[i+1], flags=re.UNICODE):
                 has_ligature_dashes = True