Fix bug #9383. Writing directly to the output stream bypassed the

machinery that clears the tag stack.

(cherry picked from commit 5a78a112b6)
This commit is contained in:
Richard Heck 2015-02-09 17:24:13 -05:00
parent 1163ea4369
commit 9f3367e665
2 changed files with 16 additions and 10 deletions

View File

@ -307,26 +307,30 @@ int InsetQuotes::plaintext(odocstringstream & os,
}
int InsetQuotes::docbook(odocstream & os, OutputParams const &) const
{
docstring InsetQuotes::getQuoteEntity() const {
if (times_ == DoubleQuotes) {
if (side_ == LeftQuote)
os << "&ldquo;";
return from_ascii("&ldquo;");
else
os << "&rdquo;";
} else {
if (side_ == LeftQuote)
os << "&lsquo;";
else
os << "&rsquo;";
return from_ascii("&rdquo;");
}
if (side_ == LeftQuote)
return from_ascii("&lsquo;");
else
return from_ascii("&rsquo;");
}
int InsetQuotes::docbook(odocstream & os, OutputParams const &) const
{
os << getQuoteEntity();
return 0;
}
docstring InsetQuotes::xhtml(XHTMLStream & xs, OutputParams const & op) const
{
docbook(xs.os(), op);
xs << XHTMLStream::ESCAPE_NONE << getQuoteEntity();
return docstring();
}

View File

@ -109,6 +109,8 @@ private:
void parseString(std::string const &);
///
docstring displayString() const;
///
docstring getQuoteEntity() const;
///
QuoteLanguage language_;