]> 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)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 1 Jul 2012 00:12:56 +0000 (02:12 +0200)
src/tex2lyx/Parser.cpp

index fc3b4d2407e3982f19a5d3217706309112477c4f..6cd727c230908f79b780dd66b028bd28a3562e4d 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