mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
tex2lyx/text.cpp: code improvement as proposed by Georg
This commit is contained in:
parent
e6a542fd6d
commit
8e72135a3f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user