char_type c = par.getUChar(buf.params(), i);
- if (c == Paragraph::META_INSET || c == ' ') {
+ if (par.isInset(i) || c == ' ') {
if (runparams.linelen > 0 &&
currlinelen + word.length() > runparams.linelen) {
os << '\n';
word.erase();
}
- switch (c) {
- case Paragraph::META_INSET: {
+ if (par.isInset(i)) {
OutputParams rp = runparams;
rp.depth = par.params().depth();
int len = par.getInset(i)->plaintext(buf, os, rp);
currlinelen = len - Inset::PLAINTEXT_NEWLINE;
else
currlinelen += len;
- break;
+ continue;
}
+ switch (c) {
case ' ':
os << ' ';
currlinelen++;