]> git.lyx.org Git - features.git/commitdiff
Fix bug #7634. Make sure we clear the tag deque if we are keeping
authorRichard Heck <rgheck@comcast.net>
Mon, 20 Jun 2011 16:10:21 +0000 (16:10 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 20 Jun 2011 16:10:21 +0000 (16:10 +0000)
empty paragraphs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39153 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp
src/output_xhtml.cpp
src/output_xhtml.h
status.20x

index 9dda69e063063ccb1727c1df4daed8a82dbc1c9e..11728b49a12f5d324e1ccde2fb773534348805ba 100644 (file)
@@ -2734,7 +2734,7 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
 
        Layout const & style = *d->layout_;
 
-       xs.startParagraph();
+       xs.startParagraph(allowEmpty());
 
        if (!runparams.for_toc && runparams.html_make_pars) {
                // generate a magic label for this paragraph
index 3a157c6f4d68c781da5b7fe65c35a39351c27c71..8d1be2bb1402a27c7bb2668a820aef4d2bac0429 100644 (file)
@@ -227,7 +227,7 @@ bool XHTMLStream::closeFontTags()
                        return true;
                curtag = tag_stack_.back();
        }
-
+       
        if (curtag.tag_ == parsep_tag)
                return true;
 
@@ -246,9 +246,11 @@ bool XHTMLStream::closeFontTags()
 }
 
 
-void XHTMLStream::startParagraph()
+void XHTMLStream::startParagraph(bool keep_empty)
 {
        pending_tags_.push_back(html::StartTag(parsep_tag));
+       if (keep_empty)
+               clearTagDeque();
 }
 
 
index 4c389bd0aabfa1683d4b713c74262b12dda71c7a..416e0daf4909337cdcf091693dd92e880d0a4b67 100644 (file)
@@ -103,7 +103,7 @@ public:
        bool closeFontTags();
        /// call at start of paragraph. sets a mark so we know what tags
        /// to close at the end. 
-       void startParagraph();
+       void startParagraph(bool keep_empty);
        /// call at end of paragraph to clear that mark. note that this
        /// will also close any tags still open. 
        void endParagraph();
index e134944664284e2a5437cb5eceafd9a5c3bb289f..34deddbfdd291fc0f741caab9e99f01c4a8c0f74 100644 (file)
@@ -101,6 +101,8 @@ What's new
 
 - Fixed XHTML output for tables that use multirow.
 
+- Fix problem with XHTML output of blank paragraph (bug 7634).
+
 - Fixed export to plaintext of, as well as searching within,
   a document containing aligned and other multi-cell environments
   (bug 7549).