commit 0c1dd609f365780d8b81987ffc3a0319f2986acd
Author: Richard Heck <[email protected]>
Date: Thu Aug 4 22:00:24 2016 -0400
Debugging code.
---
src/output_xhtml.cpp | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index 252b1d1..b09872b 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -335,6 +335,10 @@ bool XHTMLStream::closeFontTags()
// we haven't had any content
return true;
+#ifdef XHTML_DEBUG
+ dumpTagStack("Beging Close Font Tags");
+#endif
+
// this may be a useless check, since we ought at least to have
// the parsep_tag. but it can't hurt too much to be careful.
if (tag_stack_.empty())
@@ -351,6 +355,10 @@ bool XHTMLStream::closeFontTags()
curtag = tag_stack_.back();
}
+#ifdef XHTML_DEBUG
+ dumpTagStack("End Close Font Tags");
+#endif
+
if (*curtag == parsep_tag)
return true;
@@ -373,6 +381,9 @@ void XHTMLStream::startDivision(bool keep_empty)
pending_tags_.push_back(makeTagPtr(html::StartTag(parsep_tag)));
if (keep_empty)
clearTagDeque();
+#ifdef XHTML_DEBUG
+ dumpTagStack("StartDivision");
+#endif
}
@@ -390,6 +401,11 @@ void XHTMLStream::endDivision()
if (*cur_tag == parsep_tag)
break;
}
+
+#ifdef XHTML_DEBUG
+ dumpTagStack("EndDivision");
+#endif
+
return;
}
@@ -408,6 +424,10 @@ void XHTMLStream::endDivision()
writeError("Tag `" + cur_tag->tag_ + "' still open at end of
paragraph. Closing.");
os_ << cur_tag->writeEndTag();
}
+
+#ifdef XHTML_DEBUG
+ dumpTagStack("EndDivision");
+#endif
}