The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 3943b887a86f8deb1ce5846d1b0f628726f8b7ad
Author: Uwe Stöhr <[email protected]>
Date:   Sat Jun 23 20:00:49 2012 +0200

    tex2lyx/Parser.cpp: fix bug #4468: single '\' are allowed in the special 
case of '+' as comment argument delimiter

diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp
index 20f5058..5d0335a 100644
--- a/src/tex2lyx/Parser.cpp
+++ b/src/tex2lyx/Parser.cpp
@@ -398,7 +398,14 @@ Parser::Arg Parser::getFullArg(char left, char right)
        if (c != left) {
                putback();
                return make_pair(false, string());
-       } else
+       } else {
+               // in case of the '+' as delimiter single a '\' is allowed
+               // as content, for example "\verb+\+" (reported as bug #4468)
+               // we need special handling because single \ are normally 
ignored
+               // or taken as start of a command
+               if (c == '+')
+                       if (next_token().cat() == catEscape)
+                               result += '\\';
                while ((c = getChar()) != right && good()) {
                        // Ignore comments
                        if (curr_token().cat() == catComment) {
@@ -408,7 +415,7 @@ Parser::Arg Parser::getFullArg(char left, char right)
                        else
                                result += curr_token().asInput();
                }
-
+       }
        return make_pair(true, result);
 }
 

-----------------------------------------------------------------------

Summary of changes:
 src/tex2lyx/Parser.cpp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to