14 Commits
Author SHA1 Message Date
dtourolle 284d521125 fix(html): keep inline content inside block containers (S1)
Inline tags map to ignore_handler because they are meant to be consumed by
extract_text_content, but only paragraph_handler and heading_handler ever called
it. Every other container walked its children calling process_element, so inline
tags returned None and their text was dropped:

  <p>hello <b>world</b> again</p>      -> hello world again   (correct)
  <div>hello <b>world</b> again</div>  -> nothing at all
  <li>hello <b>world</b> again</li>    -> nothing at all
  <td>hello <b>world</b> again</td>    -> nothing at all
  <td><a href=u>link</a> text</td>     -> text   (link discarded)

div_handler ignored bare text nodes outright, so a div containing text produced
no blocks whatsoever - which for real HTML and EPUB is most of the document.
Where text did survive, in cells and list items, each text node became its own
paragraph, so "a <b>b</b> c" fragmented onto separate lines.

process_block_children now walks a container's children once, gathering runs of
inline content into a single paragraph and letting block children through to
their own handlers, preserving document order. div, li, td, th and blockquote
all delegate to it, so they gain nested blocks, links and mixed content
together. <br> ends the current run rather than being a no-op.

extract_text_content is split so the run-level logic can be reused without
building a synthetic element: extract_words_from_nodes takes the nodes directly,
and skips comments, which previously had their text extracted as content.

paragraph_handler keeps its own image-splitting path for now; folding it into
process_block_children would also fix the ordering of text around images in a
paragraph, but it carries the EPUB cover-detection behaviour and is left alone.
2026-08-06 22:31:34 +02:00
dtourolle 303179865d tests for author names and metadata extraction
Python CI / test (3.10) (push) Successful in 2m16s
Python CI / test (3.12) (push) Successful in 2m7s
Python CI / test (3.13) (push) Successful in 2m2s
2025-11-10 13:54:36 +01:00
dtourolle 9fb6792e10 fix missing images in paras
Python CI / test (3.10) (push) Successful in 2m6s
Python CI / test (3.12) (push) Successful in 1m58s
Python CI / test (3.13) (push) Successful in 1m51s
2025-11-09 22:25:23 +01:00
dtourolle 10612fefae undoing more autoflake8 damage
Python CI / test (push) Failing after 43s
2025-11-09 00:11:48 +01:00
dtourolle ce7293824e fixing unterminated fsting
Python CI / test (push) Failing after 46s
2025-11-09 00:09:04 +01:00
dtourolle 781a9b6c08 auto flake and corrections 2025-11-08 23:46:15 +01:00
dtourolle 00314c9b4f ADDITIOANL TEST
Python CI / test (push) Successful in 6m49s
2025-11-08 19:39:10 +01:00
dtourolle 15305011dc moved gestures to application
Python CI / test (push) Successful in 6m36s
2025-11-07 22:18:24 +01:00
dtourolle 33e2cbc363 remove application from library
Python CI / test (push) Failing after 6m29s
2025-11-07 18:48:36 +01:00
dtourolle 1bd9fdb551 more repo cleaning
Python CI / test (push) Successful in 10m0s
2025-11-06 17:40:34 +01:00
dtourolle 84229ad4da update tests
Python CI / test (push) Successful in 10m1s
2025-11-05 22:47:49 +01:00
dtourolle 4fe5f8cf60 Added links
Python CI / test (push) Failing after 6m34s
2025-11-04 13:39:21 +01:00
dtourolle 718027f3c8 Fix tests
Python CI / test (push) Failing after 5m26s
2025-09-12 21:23:56 +02:00
dtourolle 65ab46556f big update with ok rendering
Python CI / test (push) Failing after 3m55s
2025-08-27 22:22:54 +02:00