]> git.lyx.org Git - features.git/commitdiff
Rather than do checks for empty tags elsewhere, accept them and ignore them.
authorRichard Heck <rgheck@comcast.net>
Thu, 19 Nov 2009 20:39:07 +0000 (20:39 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 19 Nov 2009 20:39:07 +0000 (20:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32092 a592a061-630c-0410-9148-cb99ea01b6c8

src/output_xhtml.cpp

index 1b8593ba572002ff7edc2097cb010cb3a4fda1c5..b01407a62f6a71c018af4c05763a42785d0a1823 100644 (file)
@@ -201,6 +201,8 @@ XHTMLStream & XHTMLStream::operator<<(char_type c)
 
 XHTMLStream & XHTMLStream::operator<<(StartTag const & tag) 
 {
+       if (tag.tag_.empty())
+               return *this;
        pending_tags_.push_back(tag);
        if (tag.keepempty_)
                clearTagDeque();
@@ -210,6 +212,8 @@ XHTMLStream & XHTMLStream::operator<<(StartTag const & tag)
 
 XHTMLStream & XHTMLStream::operator<<(CompTag const & tag) 
 {
+       if (tag.tag_.empty())
+               return *this;
        clearTagDeque();
        // tabs?
        os_ << tag.asTag();
@@ -236,6 +240,8 @@ bool        XHTMLStream::isTagOpen(string const & stag)
 // best to make things work.
 XHTMLStream & XHTMLStream::operator<<(EndTag const & etag)
 {
+       if (etag.tag_.empty())
+               return *this;
        // first make sure we're not closing an empty tag
        if (!pending_tags_.empty()) {
                StartTag const & stag = pending_tags_.back();