- if (!isTagOpen(parsep_tag)) {
- // is it pending?
- TagStack::const_iterator dit = pending_tags_.begin();
- TagStack::const_iterator const den = pending_tags_.end();
- bool found = false;
- for (; dit != den; ++dit) {
- if (dit->tag_ == parsep_tag) {
- found = true;
- break;
- }
- }
-
- if (!found) {
- writeError("No paragraph separation tag found in endParagraph().");
- return;
- }
-
- // this case is normal.
+ if (isTagPending(parsep_tag)) {
+ // this case is normal. it just means we didn't have content,
+ // so the parsep_tag never got moved onto the tag stack.