mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
tex2lyx: Fix two bugs in nomencl import
* The comment character % is made active to serve as an escape char * quotation marks need to be escaped
This commit is contained in:
parent
23379bb1d5
commit
5bc4c11fd6
@ -5009,10 +5009,18 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
string prefix = convert_literate_command_inset_arg(p.getArg('[', ']'));
|
||||
if (!prefix.empty())
|
||||
os << "prefix " << '"' << prefix << '"' << "\n";
|
||||
// nomencl activates %
|
||||
CatCode savecc = p.catcode('%');
|
||||
p.setCatcode('%', catActive);
|
||||
string symbol = p.verbatim_item();
|
||||
p.setCatcode('%', savecc);
|
||||
// escape quotation marks
|
||||
symbol = subst(symbol, "\"", "\\\"");
|
||||
pair<bool, string> sym = convert_latexed_command_inset_arg(symbol);
|
||||
bool literal = !sym.first;
|
||||
string description = p.verbatim_item();
|
||||
// escape quotation marks
|
||||
description = subst(description, "\"", "\\\"");
|
||||
pair<bool, string> desc = convert_latexed_command_inset_arg(description);
|
||||
literal |= !desc.first;
|
||||
if (literal) {
|
||||
|
Loading…
Reference in New Issue
Block a user