[LyX/master] Do not output label tags if there is no label
Richard Kimberly Heck
rikiheck at lyx.org
Sun Dec 4 16:56:23 UTC 2022
commit b37ac5807f388a690436e4af809acf6506905eb5
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Sun Dec 4 12:01:42 2022 -0500
Do not output label tags if there is no label
---
src/output_xhtml.cpp | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index 9924be1..47c4145 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -466,10 +466,13 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
xs << xml::CR();
}
else {
- openLabelTag(xs, style);
- xs << par->params().labelString();
- closeLabelTag(xs, style);
- xs << xml::CR();
+ docstring const & ls = par->params().labelString();
+ if (!ls.empty()) {
+ openLabelTag(xs, style);
+ xs << ls;
+ closeLabelTag(xs, style);
+ xs << xml::CR();
+ }
}
}
} // end label output
More information about the lyx-cvs
mailing list