]> 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 11:19:50 +0000 (12:19 +0100)
Fixes: #11078
src/tex2lyx/text.cpp

index 53620380ddf139e9c6e5eae1ad65474e7555bd9e..24f57feeb6206472a49341a8a5df359bb6b5cc28 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,