fix bug 1620 in tex2lyx

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9098 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2004-10-21 14:04:59 +00:00
parent e416d1aea7
commit 83eced7fdc
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-10-20 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* text.C (parse_text): replace newlines with spaces in arguments to
known latex commands, fixes bug 1620
2004-10-12 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* preamble.C (end_preamble): change file format from 236 to 237

View File

@ -1553,9 +1553,11 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
context.check_layout(os);
begin_inset(os, "LatexCommand ");
os << '\\' << t.cs();
os << p.getOpt();
os << p.getOpt();
os << '{' << p.verbatim_item() << "}\n";
// lyx cannot handle newlines in a latex command
// FIXME: Move the substitution into parser::getOpt()?
os << subst(p.getOpt(), "\n", " ");
os << subst(p.getOpt(), "\n", " ");
os << '{' << subst(p.verbatim_item(), "\n", " ") << "}\n";
end_inset(os);
}