commit 2b87026bf96cac255e69fef35f7cf0dc2c02f68b
Author: Richard Heck <[email protected]>
Date:   Sat Jul 9 14:28:27 2016 -0400

    Update XHTML debugging code a bit.
---
 src/output_xhtml.cpp |   20 +++++++++++++-------
 src/output_xhtml.h   |    4 +---
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index cc43e62..b50f982 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -291,21 +291,27 @@ XHTMLStream::XHTMLStream(odocstream & os)
 
 
 #ifdef XHTML_DEBUG
-void XHTMLStream::dumpTagStack(string const & msg) const
+void XHTMLStream::dumpTagStack(string const & msg)
 {
-       writeError(msg + ": Tag Stack");
-       TagStack::const_reverse_iterator it = tag_stack_.rbegin();
-       TagStack::const_reverse_iterator en = tag_stack_.rend();
+       *this << html::CR();
+       writeError(msg);
+       *this << html::CR();
+       writeError("Tag Stack");
+       TagDeque::const_reverse_iterator it = tag_stack_.rbegin();
+       TagDeque::const_reverse_iterator en = tag_stack_.rend();
        for (; it != en; ++it) {
-               writeError(it->tag_);
+               writeError(it->get()->tag_);
        }
+       writeError("End Tag Stack");
+       *this << html::CR();
        writeError("Pending Tags");
        it = pending_tags_.rbegin();
        en = pending_tags_.rend();
        for (; it != en; ++it) {
-               writeError(it->tag_);
+               writeError(it->get()->tag_);
        }
-       writeError("End Tag Stack");
+       writeError("End Pending Tags");
+       *this << html::CR();
 }
 #endif
 
diff --git a/src/output_xhtml.h b/src/output_xhtml.h
index 2b17047..57a2b2b 100644
--- a/src/output_xhtml.h
+++ b/src/output_xhtml.h
@@ -241,12 +241,10 @@ public:
        /// Sets what we are going to escape on the NEXT write.
        /// Everything is reset for the next time.
        XHTMLStream & operator<<(EscapeSettings);
-#if 0
        /// This routine is for debugging the tag stack, etc. Code
        /// for it is disabled by default, however, so you will need
        /// to enable it if you want to use it.
-       void dumpTagStack(std::string const & msg) const;
-#endif
+       void dumpTagStack(std::string const & msg);
 private:
        ///
        void clearTagDeque();

Reply via email to