From d96c36e555d01947b51845bf53b58d707638a643 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 2 Jan 2007 12:35:53 +0000 Subject: [PATCH] Fix bug 3052: Always start a new paragraph after a noweb code chunk git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16467 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/text.C | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tex2lyx/text.C b/src/tex2lyx/text.C index 8b169b2167..2f7740686f 100644 --- a/src/tex2lyx/text.C +++ b/src/tex2lyx/text.C @@ -1055,7 +1055,13 @@ void parse_noweb(Parser & p, ostream & os, Context & context) return; } - context.check_end_layout(os); + // We use new_paragraph instead of check_end_layout because the stuff + // following the noweb chunk needs to start with a \begin_layout. + // This may create a new paragraph even if there was none in the + // noweb file, but the alternative is an invalid LyX file. Since + // noweb code chunks are implemented with a layout style in LyX they + // always must be in an own paragraph. + context.new_paragraph(os); Context newcontext(true, context.textclass, context.textclass["Scrap"]); newcontext.check_layout(os); os << name; -- 2.39.5