Fix bug 2768 (inset comment eats space after it)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14692 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2006-08-15 15:12:26 +00:00
parent e305fdea55
commit 6be47509b8

View File

@ -265,7 +265,20 @@ int InsetNote::latex(Buffer const & buf, ostream & os,
ostringstream ss;
ss << "%\n\\begin{" << type << "}\n";
InsetText::latex(buf, ss, runparams);
ss << "%\n\\end{" << type << "}\n";
ss << "\n\\end{" << type << "}\n";
// the space after the comment in 'a[comment] b' will be eaten by the
// comment environment since the space before b is ignored with the
// following latex output:
//
// a%
// \begin{comment}
// comment
// \end{comment}
// b
//
// Adding {} before ' b' fixes this.
if (params_.type == InsetNoteParams::Comment)
ss << "{}";
string const str = ss.str();
os << str;