Am 30.06.2012 15:17, schrieb Uwe Stöhr:
2. You must compare it with 'right'
That would imply that the delimiters are different. But the aim was only to
support single '\' as
arguments of \verb as in other cases single '\' are not allowed and could break
the compilation.
I wanted to skip cases like
[\}
because this is in any case invalid LaTeX code.
Perhaps I should add a comment.
What about the attached patch?
regards Uwe
diff --git "a/C:\\DOCUME~1\\usti\\LOCALS~1\\Temp\\Par36.tmp\\Parser-HEAD-left.cpp" "b/D:\\LyXGit\\Master\\src\\tex2lyx\\Parser.cpp"
index fc3b4d2..6cd727c 100644
--- "a/C:\\DOCUME~1\\usti\\LOCALS~1\\Temp\\Par36.tmp\\Parser-HEAD-left.cpp"
+++ "b/D:\\LyXGit\\Master\\src\\tex2lyx\\Parser.cpp"
@@ -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