mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-22 18:57:14 +00:00
Two things between a converted EPUB and its chapter titles.
The heading level taken as the chapter map was the shallowest present. Pandoc
writes the book's title as the only `#` and every real chapter as a `##`, so
the shallowest level had one heading in it and the whole book came back as a
single chapter. The dividing level is now the shallowest one used more than
once — a level used once is a title.
And an empty bracketed span survived the heading cleaner, because the pattern
wanted at least one character between the brackets. Pandoc writes an anchor
as exactly that: `## []{#link2H_INTR} Introduction`.
Gibbon's first volume, converted from the Project Gutenberg EPUB: 2 distinct
chapter titles before, 61 after, and none of them carrying an element id.
17 lines
446 B
TOML
17 lines
446 B
TOML
# Standalone so that `cargo run` here does not need the workspace above it.
|
|
[workspace]
|
|
|
|
[package]
|
|
name = "catena-example"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
rust-version = "1.85"
|
|
publish = false
|
|
|
|
[dependencies]
|
|
booksniff = { path = "../../crates/booksniff" }
|
|
chunkmd = { path = "../../crates/chunkmd" }
|
|
citefind = { path = "../../crates/citefind" }
|
|
corpus-core = { path = "../../crates/corpus-core" }
|
|
mdscrub = { path = "../../crates/mdscrub" }
|