From 8e72135a3f6a2a3dc043c9a4212e418dfaf12e0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Thu, 15 Mar 2012 02:10:13 +0100 Subject: [PATCH] tex2lyx/text.cpp: code improvement as proposed by Georg --- src/tex2lyx/text.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index e083e39ec8..0581eab847 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1123,14 +1123,7 @@ void parse_listings(Parser & p, ostream & os, Context & parent_context, bool in_ parent_context.check_layout(os); begin_inset(os, "listings\n"); if (p.hasOpt()) { - // there can be a [] pair inside the argument for the language - string arg = p.getArg('[', ']'); - if (arg.find("language={[") != string::npos) { - char start = p.next_token().character(); - arg += ']'; - arg += start; - arg += p.getArg(start, ']'); - } + string arg = p.verbatimOption(); os << "lstparams " << '"' << arg << '"' << '\n'; } if (in_line) -- 2.39.5