- ss << "%\n\\end{" << type << "}\n";
-
- string const str = ss.str();
- os << str;
- // Return how many newlines we issued.
- return int(lyx::count(str.begin(), str.end(),'\n'));
-}
-
-
-int InsetNote::linuxdoc(Buffer const & buf, std::ostream & os,
- OutputParams const & runparams_in) const
-{
- if (params_.type == InsetNoteParams::Note)
- return 0;
-
- OutputParams runparams(runparams_in);
- ostringstream ss;
- if (params_.type == InsetNoteParams::Comment) {
- ss << "<comment>\n";
- runparams.inComment = true;
- // Ignore files that are exported inside a comment
- runparams.exportdata.reset(new ExportData);
- }
-
- InsetText::linuxdoc(buf, ss, runparams);
-
+ ss << "\n\\end{" << from_ascii(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.