X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetSpecialChar.cpp;h=f342d0f20d0ee24de9a2149da9e495e9b7c7ac0d;hb=6b49b6b129af9417fea7ea907a44a46fbbd38340;hp=9e7346ffbf6c307fb2064a991438ab294ea8338a;hpb=f483fb8e9d1e994b33e9b08d2515dc4100126531;p=lyx.git diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp index 9e7346ffbf..f342d0f20d 100644 --- a/src/insets/InsetSpecialChar.cpp +++ b/src/insets/InsetSpecialChar.cpp @@ -239,7 +239,8 @@ void InsetSpecialChar::latex(otexstream & os, } -int InsetSpecialChar::plaintext(odocstream & os, OutputParams const &) const +int InsetSpecialChar::plaintext(odocstringstream & os, + OutputParams const &, size_t) const { switch (kind_) { case HYPHENATION: @@ -323,7 +324,17 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs, OutputParams const &) const 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(); }