]> git.lyx.org Git - features.git/commitdiff
Do not output label tags if there is no label
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 4 Dec 2022 17:01:42 +0000 (12:01 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 4 Dec 2022 17:01:42 +0000 (12:01 -0500)
src/output_xhtml.cpp

index 9924be150e5520127b535ea45026702a7ba82349..47c4145456399f7202074309e6c395c5f2707979 100644 (file)
@@ -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