]> git.lyx.org Git - features.git/commitdiff
tex2lyx/Parser.cpp: refine \verb handling
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 1 Jul 2012 00:12:56 +0000 (02:12 +0200)
committerGeorg Baum <baum@lyx.org>
Wed, 28 Nov 2012 20:51:57 +0000 (21:51 +0100)
src/tex2lyx/Parser.cpp

index ec48e01d02b37868e1958818fa29a654bf31784a..e8337f489c1d9c799469fadf9c4c08c5158169b7 100644 (file)
@@ -402,9 +402,9 @@ Parser::Arg Parser::getFullArg(char left, char right)
                // for \verb a single '\' is allowed no matter what the delimiter is
                // for example "\verb+\+" (reported as bug #4468)
                // To support this, we allow single '\' if it is the only character
-               // within the delimiters
+               // within equal delimiters
                if (next_token().cat() == catEscape)
-                       if (next_token().character() == c)
+                       if (next_token().character() == right && right == left)
                                result += '\\';
                while ((c = getChar()) != right && good()) {
                        // Ignore comments