//
///////////////////////////////////////////////////////////////////////////
-TocItem::TocItem(ParConstIterator const & par_it, int d,
- docstring const & s)
- : par_it_(par_it), depth_(d), str_(s)
+TocItem::TocItem(ParConstIterator const & par_it, int d, docstring const & s)
+ : par_it_(par_it), depth_(d), str_(s)
{
}
}
-TocIterator const TocBackend::item(string const & type,
+TocIterator TocBackend::item(string const & type,
ParConstIterator const & par_it) const
{
TocList::const_iterator toclist_it = tocs_.find(type);
--it;
ParConstIterator par_it_text = par_it;
- if (par_it_text.inMathed())
- // It would be better to do
- // par_it_text.backwardInset();
- // but this method does not exist.
+ if (par_it_text.inMathed()) {
+ // We are only interested in text so remove the math CursorSlice.
while (par_it_text.inMathed())
- par_it_text.backwardPos();
+ par_it_text.pop_back();
+ }
for (; it != last; --it) {
// We verify that we don't compare contents of two