bool emph_flag = false;
bool bold_flag = false;
- string closing_tag;
Layout const & style = *d->layout_;
+ xs.startParagraph();
+
if (!runparams.for_toc && runparams.html_make_pars) {
// generate a magic label for this paragraph
string const attr = "id='" + magicLabel() + "'";
}
xs.closeFontTags();
+ xs.endParagraph();
return retval;
}
bool Paragraph::isMisspelled(pos_type pos, bool check_boundary) const
{
bool result = SpellChecker::misspelled(d->speller_state_.getState(pos));
- if (result || pos <= 0 || pos >= size())
+ if (result || pos <= 0 || pos > size())
return result;
- if (check_boundary && isWordSeparator(pos))
+ if (check_boundary && (pos == size() || isWordSeparator(pos)))
result = SpellChecker::misspelled(d->speller_state_.getState(pos - 1));
return result;
}