]> git.lyx.org Git - features.git/commitdiff
tex2lyx: do not eat empty paragraphs if keepempty is true
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 17 Mar 2018 11:19:50 +0000 (12:19 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 17 Mar 2018 12:55:33 +0000 (13:55 +0100)
Fixes: #11078
(cherry picked from commit 79728dcde975fc5968d0ef9e6b56df57023acd88)

src/tex2lyx/text.cpp

index d4dfbfabf042d048e39d30db066bb05f64430c05..ce357ea0315a14e6524077acce7e27e1c55e44cd 100644 (file)
@@ -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,