commit b0c9da0da198c3b42e08ead912493222179db506
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Mar 17 12:19:50 2018 +0100

    tex2lyx: do not eat empty paragraphs if keepempty is true
    
    Fixes: #11078
    (cherry picked from commit 79728dcde975fc5968d0ef9e6b56df57023acd88)
---
 src/tex2lyx/text.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index d4dfbfa..ce357ea 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -2099,6 +2099,12 @@ void parse_environment(Parser & p, ostream & os, bool 
outer,
                        break;
                }
                context.check_deeper(os);
+               if (newlayout->keepempty) {
+                       // We need to start a new paragraph
+                       // even if it is empty.
+                       context.new_paragraph(os);
+                       context.check_layout(os);
+               }
                // handle known optional and required arguments
                if (context.layout->latextype == LATEX_ENVIRONMENT)
                        output_arguments(os, p, outer, false, string(), context,

Reply via email to