From e517945aaa3a15ba479ab283457127b1cdbf8775 Mon Sep 17 00:00:00 2001
From: Maeve Andrews <37351465+maeveynot@users.noreply.github.com>
Date: Wed, 14 Jan 2026 06:23:03 -0600
Subject: [PATCH] Add a bullet to the beginning of any
(#368)
Currently there is no visual indication whatsoever if something is in a
list. An `` is essentially just another paragraph.
As a partial remedy for this, add a bullet character to the beginning of
`` text blocks so that the user can see that they're list items.
This is incomplete in that an `` should also have a counter so that
its list items can get numbers instead of bullets (right now I don't
think we track if we're in a `` or an `` at all), but it's
strictly better than the current situation.
Co-authored-by: Maeve Andrews
---
lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
index b9305b1..e3e0831 100644
--- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
+++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
@@ -97,6 +97,9 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
self->startNewTextBlock(self->currentTextBlock->getStyle());
} else {
self->startNewTextBlock((TextBlock::Style)self->paragraphAlignment);
+ if (strcmp(name, "li") == 0) {
+ self->currentTextBlock->addWord("\xe2\x80\xa2", EpdFontFamily::REGULAR);
+ }
}
} else if (matches(name, BOLD_TAGS, NUM_BOLD_TAGS)) {
self->boldUntilDepth = std::min(self->boldUntilDepth, self->depth);