From 924119797e54a6eb05575fa0201530ee27a84c40 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 6 Jun 2009 01:56:46 +0000 Subject: [PATCH] Fix another potentially infinite loop. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29980 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/output_xhtml.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 67ae2cc302..0dea4602de 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -241,6 +241,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, case LATEX_ENVIRONMENT: case LATEX_LIST_ENVIRONMENT: case LATEX_ITEM_ENVIRONMENT: { + // FIXME Factor this out. // There are two possiblities in this case. // One is that we are still in the environment in which we // started---which we will be if the depth is the same. @@ -257,7 +258,9 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, if (label_tag_opened) closeLabelTag(os, cstyle); os << '\n'; - } else if (style.latextype == LATEX_ENVIRONMENT + } + // FIXME Why did I put that first condition?? + else if (style.latextype == LATEX_ENVIRONMENT && style.labeltype != LABEL_NO_LABEL) { bool const label_tag_opened = openLabelTag(os, cstyle); os << pbegin->expandLabel(style, buf.params(), false); @@ -300,6 +303,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf, // FIXME case LATEX_BIB_ENVIRONMENT: case LATEX_COMMAND: + ++par; break; } } @@ -326,6 +330,7 @@ void makeCommand(Buffer const & buf, bool const main_tag_opened = openTag(os, style); // Label around sectioning number: + // FIXME Probably need to account for LABEL_MANUAL if (style.labeltype != LABEL_NO_LABEL) { bool const label_tag_opened = openLabelTag(os, style); os << pbegin->expandLabel(style, buf.params(), false); -- 2.39.2