"Unexpected close marker class: "
+ m.getClass().getName());
}
if (m instanceof HeadingMarker) {
headingM = (HeadingMarker) m;
SectionHeading sh = headingM.getSectionHeading();
enumerationFormats =
headingM.updatedEnumerationFormats(enumerationFormats);
sh.setEnumerationFormats(enumerationFormats);
sections.add(sh);
int newLevel = sh.getLevel();
if (newLevel > headingLevel) {
headingLevel = newLevel;
} else if (newLevel < headingLevel) {
for (int i = headingLevel; i > newLevel; i--)
curSequences[i-1] = -1;
headingLevel = newLevel;
} else {
// No level change
// Intentionally empty
}
if (headingM.getFormatReset() != null)
curSequences[headingLevel-1] = -1;
curSequences[headingLevel-1] += 1;
sh.setSequences(curSequences);
}
}
if (stack.size() != 0)
throw new CreoleParseException(
"Unmatched tag(s) generated: " + stack);