- // FIXME: Any docbook option here?
- return InsetCollapsible::docbook(os, runparams);
+ // The special combining character must be put in the middle, between the two other characters.
+ // It will not work if there is anything else than two pure characters, so going back to plaintext.
+ odocstringstream ods;
+ int h = (int)(InsetText::plaintext(ods, runparams) / 2);
+ docstring result = ods.str();
+ docstring const before = result.substr(0, h);
+ docstring const after = result.substr(h, result.size());
+
+ xs << XMLStream::ESCAPE_NONE << before;
+ if (params_.type == InsetIPADecoParams::Toptiebar)
+ xs << XMLStream::ESCAPE_NONE << "͡";
+ else if (params_.type == InsetIPADecoParams::Bottomtiebar)
+ xs << XMLStream::ESCAPE_NONE << "͜";
+ xs << XMLStream::ESCAPE_NONE << after;