]> git.lyx.org Git - features.git/commitdiff
Fix CSS output for lists.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 4 Dec 2022 19:55:59 +0000 (14:55 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 4 Dec 2022 19:56:01 +0000 (14:56 -0500)
Somehow that got committed before it was done. I guess I'm out of
practice...

src/output_xhtml.cpp

index c812966b2ad9101e8752d24ef58b8fef219cb9fc..4418f28c7789093cd74ea0bc63820d07b260f8df 100644 (file)
@@ -417,9 +417,9 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
                // be done at all in HTML.)
 
                // Code adapated from Buffer::Impl::setLabel
+               bool const isenum = bstyle.labeltype == LABEL_ENUMERATE;
                docstring enumcounter = bstyle.counter.empty() ?
-                                       (bstyle.labeltype == LABEL_ENUMERATE ?
-                                               from_ascii("lyxenum") : from_ascii("lyxitem") ) :
+                                       ( isenum ? from_ascii("enum") : from_ascii("lyxitem") ) :
                                        bstyle.counter;
                switch (par->itemdepth) {
                case 2:
@@ -438,7 +438,9 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
                        // not a valid enumdepth...
                        break;
                }
-               openParTag(xs, bstyle, to_utf8(enumcounter), pbegin->magicLabel());
+               openParTag(xs, bstyle,
+                                  string( isenum ? "lyxenum" : "lyxitem" ) + " "
+                                       + to_utf8(enumcounter), pbegin->magicLabel());
        }
        else
                openParTag(xs, bstyle, pbegin->magicLabel());