]> git.lyx.org Git - features.git/commitdiff
Update XHTML debugging code a bit.
authorRichard Heck <rgheck@lyx.org>
Sat, 9 Jul 2016 18:28:27 +0000 (14:28 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 10 Jul 2016 03:54:44 +0000 (23:54 -0400)
src/output_xhtml.cpp
src/output_xhtml.h

index cc43e62c08f3bd44dadfa9353f69a85b6c02141b..b50f982178a245b83a2cfc40f3d978960b123528 100644 (file)
@@ -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
 
index 2b1704742c9177598b05ec5fe46d53eaa9790bdc..57a2b2b8356a0f478fcda20f4c98b38de36c786b 100644 (file)
@@ -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();