From 6be47509b8662b98661601d26dc29c7e813086bc Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 15 Aug 2006 15:12:26 +0000 Subject: [PATCH] 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 --- src/insets/insetnote.C | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/insets/insetnote.C b/src/insets/insetnote.C index 3437fb12fb..0fec72f0d0 100644 --- a/src/insets/insetnote.C +++ b/src/insets/insetnote.C @@ -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;