tex2lyx: do not eat empty paragraphs if keepempty is true

Fixes: #11078
(cherry picked from commit 79728dcde9)
This commit is contained in:
Juergen Spitzmueller 2018-03-17 12:19:50 +01:00
parent cfc2f0681e
commit b0c9da0da1

View File

@ -2099,6 +2099,12 @@ void parse_environment(Parser & p, ostream & os, bool outer,
break; break;
} }
context.check_deeper(os); 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 // handle known optional and required arguments
if (context.layout->latextype == LATEX_ENVIRONMENT) if (context.layout->latextype == LATEX_ENVIRONMENT)
output_arguments(os, p, outer, false, string(), context, output_arguments(os, p, outer, false, string(), context,