commit f135c8d227b8880ee298b7aecf833342e6b152ce
Author: Enrico Forestieri <for...@lyx.org>
Date:   Sat Jun 17 19:05:02 2017 +0200

    Don't allow raw newlines in options
    
    This happens if the options are split over multiple lines in the
    latex source. A newline here confuses the lexer when reading the
    converted LyX file.
---
 src/tex2lyx/text.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index ab00093..e5180cf 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -1326,7 +1326,7 @@ void parse_listings(Parser & p, ostream & os, Context & 
parent_context,
 {
        parent_context.check_layout(os);
        begin_inset(os, "listings\n");
-       string arg = p.hasOpt() ? p.verbatimOption() : string();
+       string arg = p.hasOpt() ? subst(p.verbatimOption(), "\n", "") : 
string();
        if (use_minted) {
                string const language = p.getArg('{', '}');
                p.skip_spaces(true);

Reply via email to