[LyX/master] Fix CSS output for lists.

Richard Kimberly Heck rikiheck at lyx.org
Sun Dec 4 19:00:42 UTC 2022


commit 7b5a5e524b71d6445810b5127073e8064b9d92c6
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Sun Dec 4 14:55:59 2022 -0500

    Fix CSS output for lists.
    
    Somehow that got committed before it was done. I guess I'm out of
    practice...
---
 src/output_xhtml.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index c812966..4418f28 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -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());


More information about the lyx-cvs mailing list