}
-int InsetSpecialChar::plaintext(odocstream & os, OutputParams const &) const
+int InsetSpecialChar::plaintext(odocstringstream & os,
+ OutputParams const &, size_t) const
{
switch (kind_) {
case HYPHENATION:
- case LIGATURE_BREAK:
return 0;
+ case LIGATURE_BREAK:
+ os.put(0x200c);
+ return 1;
case END_OF_SENTENCE:
os << '.';
return 1;
os << '/';
return 1;
case NOBREAKDASH:
- os << '-';
+ os.put(0x2011);
return 1;
}
return 0;
{
switch (kind_) {
case HYPHENATION:
+ break;
case LIGATURE_BREAK:
+ xs << XHTMLStream::ESCAPE_NONE << "‌";
break;
case END_OF_SENTENCE:
xs << '.';
xs << XHTMLStream::ESCAPE_NONE << "⁄";
break;
case NOBREAKDASH:
- xs << '-';
+ xs << XHTMLStream::ESCAPE_NONE << "‑";
break;
}
return docstring();
void InsetSpecialChar::toString(odocstream & os) const
{
- plaintext(os, OutputParams(0));
+ switch (kind_) {
+ case LIGATURE_BREAK:
+ // Do not output ZERO WIDTH NON JOINER here
+ // Spell checker would choke on it.
+ return;
+ default:
+ break;
+ }
+ odocstringstream ods;
+ plaintext(ods, OutputParams(0));
+ os << ods.str();
}