Author: rgheck
Date: Mon Jun 20 17:55:41 2011
New Revision: 39152
URL: http://www.lyx.org/trac/changeset/39152

Log:
Fix bug #7634. Make sure we clear the tag deque if we are keeping
empty paragraphs.

Modified:
   lyx-devel/trunk/src/Paragraph.cpp
   lyx-devel/trunk/src/output_xhtml.cpp
   lyx-devel/trunk/src/output_xhtml.h

Modified: lyx-devel/trunk/src/Paragraph.cpp
==============================================================================
--- lyx-devel/trunk/src/Paragraph.cpp   Mon Jun 20 17:24:49 2011        (r39151)
+++ lyx-devel/trunk/src/Paragraph.cpp   Mon Jun 20 17:55:41 2011        (r39152)
@@ -2734,7 +2734,7 @@
 
        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

Modified: lyx-devel/trunk/src/output_xhtml.cpp
==============================================================================
--- lyx-devel/trunk/src/output_xhtml.cpp        Mon Jun 20 17:24:49 2011        
(r39151)
+++ lyx-devel/trunk/src/output_xhtml.cpp        Mon Jun 20 17:55:41 2011        
(r39152)
@@ -227,7 +227,7 @@
                        return true;
                curtag = tag_stack_.back();
        }
-
+       
        if (curtag.tag_ == parsep_tag)
                return true;
 
@@ -246,9 +246,11 @@
 }
 
 
-void XHTMLStream::startParagraph()
+void XHTMLStream::startParagraph(bool keep_empty)
 {
        pending_tags_.push_back(html::StartTag(parsep_tag));
+       if (keep_empty)
+               clearTagDeque();
 }
 
 

Modified: lyx-devel/trunk/src/output_xhtml.h
==============================================================================
--- lyx-devel/trunk/src/output_xhtml.h  Mon Jun 20 17:24:49 2011        (r39151)
+++ lyx-devel/trunk/src/output_xhtml.h  Mon Jun 20 17:55:41 2011        (r39152)
@@ -103,7 +103,7 @@
        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();

Reply via email to