From: Richard Heck Date: Sat, 9 Jul 2016 18:28:27 +0000 (-0400) Subject: Update XHTML debugging code a bit. X-Git-Tag: 2.3.0alpha1~1304 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2b87026bf96cac255e69fef35f7cf0dc2c02f68b;hp=db954caf8b19879b9ae82f290fb429063ae2e37f;p=features.git Update XHTML debugging code a bit. --- diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index cc43e62c08..b50f982178 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 2b1704742c..57a2b2b835 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();