mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
fix parsing of \def macros (was broken with the spreadsheet template support)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40363 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
07b2ffa469
commit
169bc143cb
@ -2326,12 +2326,19 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
|
||||
else if (is_macro(p)) {
|
||||
// catch the case of \def\inputGnumericTable
|
||||
bool macro = true;
|
||||
if (t.cs() == "def") {
|
||||
Token second = p.get_token();
|
||||
Token second = p.next_token();
|
||||
if (second.cs() == "inputGnumericTable") {
|
||||
p.pushPosition();
|
||||
p.get_token();
|
||||
skip_braces(p);
|
||||
Token third = p.get_token();
|
||||
p.popPosition();
|
||||
if (third.cs() == "input") {
|
||||
p.get_token();
|
||||
skip_braces(p);
|
||||
p.get_token();
|
||||
string name = normalize_filename(p.verbatim_item());
|
||||
string const path = getMasterFilePath();
|
||||
// We want to preserve relative / absolute filenames,
|
||||
@ -2357,10 +2364,11 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
<< name << "\n";
|
||||
end_inset(os);
|
||||
context.check_layout(os);
|
||||
macro = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_macro(p))
|
||||
if (macro)
|
||||
parse_macro(p, os, context);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user