]> git.lyx.org Git - features.git/commitdiff
Fix known_escaped_chars
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 13 Mar 2018 16:39:40 +0000 (17:39 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 13 Mar 2018 16:39:40 +0000 (17:39 +0100)
(this includes the amend)

src/tex2lyx/text.cpp

index b81b866005e78c7e831180c8f60300f13e3be217..f0b4aedace58566e3109008005fa216d7261789d 100644 (file)
@@ -346,7 +346,7 @@ string minted_nonfloat_caption = "";
 
 // Characters that have to be escaped by \\ in LaTeX
 char const * const known_escaped_chars[] = {
-               "&", "_", "$", "%", "#", "^", "{", "}"};
+               "&", "_", "$", "%", "#", "^", "{", "}", 0};
 
 
 /// splits "x=z, y=b" into a map and an ordered keyword vector
@@ -621,7 +621,7 @@ pair<bool, docstring> convert_unicodesymbols(docstring s)
                else {
                        res = false;
                        for (auto const & c : known_escaped_chars)
-                               if (prefixIs(s, from_ascii("\\") + c))
+                               if (c != 0 && prefixIs(s, from_ascii("\\") + c))
                                        res = true;
                        i = 1;
                }