From 66920e5b1afa1f2c03580e0e6be3448fa64c4b3c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 20 Jun 2011 16:10:21 +0000 Subject: [PATCH] Fix bug #7634. Make sure we clear the tag deque if we are keeping 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 | 2 +- src/output_xhtml.cpp | 6 ++++-- src/output_xhtml.h | 2 +- status.20x | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 9dda69e063..11728b49a1 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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 diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 3a157c6f4d..8d1be2bb14 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -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(); } diff --git a/src/output_xhtml.h b/src/output_xhtml.h index 4c389bd0aa..416e0daf49 100644 --- a/src/output_xhtml.h +++ b/src/output_xhtml.h @@ -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(); diff --git a/status.20x b/status.20x index e134944664..34deddbfdd 100644 --- a/status.20x +++ b/status.20x @@ -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). -- 2.39.5