From: Juergen Spitzmueller Date: Sat, 17 Mar 2018 11:19:50 +0000 (+0100) Subject: tex2lyx: do not eat empty paragraphs if keepempty is true X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3694 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=79728dcde975fc5968d0ef9e6b56df57023acd88;p=features.git tex2lyx: do not eat empty paragraphs if keepempty is true Fixes: #11078 --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 53620380dd..24f57feeb6 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,