From: Richard Heck Date: Thu, 19 Nov 2009 20:39:07 +0000 (+0000) Subject: Rather than do checks for empty tags elsewhere, accept them and ignore them. X-Git-Tag: 2.0.0~5092 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=95a8e89e04dcfe69628ef74fa7901412b1ac5d69;p=features.git Rather than do checks for empty tags elsewhere, accept them and ignore them. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32092 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 1b8593ba57..b01407a62f 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -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();