Properly deal with svg elements

This commit is contained in:
jpirnay
2026-05-18 08:18:13 +02:00
parent 3ac6752241
commit 8732c56499
2 changed files with 27 additions and 0 deletions
@@ -36,6 +36,7 @@ class ChapterHtmlSlimParser final : public Print {
int underlineUntilDepth = INT_MAX;
int strikethroughUntilDepth = INT_MAX;
int preUntilDepth = INT_MAX; // set when inside a <pre> element; enables \n → line-break handling
int svgDepth = 0; // nesting counter for <svg> elements; text inside SVG is skipped (path data etc.)
// buffer for building up words from characters, will auto break if longer than this
// leave one char at end for null pointer
char partWordBuffer[MAX_WORD_SIZE + 1] = {};