mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-22 18:57:14 +00:00
chunkmd, citefind: the back-reference marker a whole class of EPUBs leaves
\[←788 \]
\[[←193](index_split_011.xhtml#citation-193) \]
An arrow pointing back to where the note was called, sometimes a link and
sometimes not, inside escaped brackets. Neither pattern knew it, so a page of
notes set this way read as body prose: the chunk was never flagged, the
citation stage never selected it, and the book came out with nothing.
Ten books of the corpus use it and eight of them had zero citations —
including both volumes of *The Decline of the West*, whose 830 endnotes are
exactly what this is for. 142 of the 199 affected chunks are those two books.
Recorded in parity/KNOWN.md: the Python this was ported from did not know the
marker either, and no fixture carries one, so the suite agrees either way.
This commit is contained in:
@@ -60,6 +60,10 @@ static NOTE_MARKER: LazyLock<FancyRegex> = LazyLock::new(|| {
|
||||
| \[ {SPACE}* (?:<span[^>]*>)? {SPACE}* \d{{1,3}}
|
||||
{SPACE}* (?:</span>)? {SPACE}* \] \( \#[^)]* \) # [42](#...)
|
||||
| <sup> {SPACE}* \d{{1,3}} {SPACE}* </sup> # bare sup note
|
||||
| \\?\[ {SPACE}* (?: \[ {SPACE}* )? # `\[←788 \]` and
|
||||
[\u{{2190}}\u{{2191}}\u{{21D1}}\u{{23CE}}] # `\[[←193](file#frag) \]`
|
||||
{SPACE}* \d{{1,4}} {SPACE}*
|
||||
(?: \] \( [^)\s]* \) )? {SPACE}* \\?\]
|
||||
)"
|
||||
))
|
||||
.expect("a valid pattern")
|
||||
|
||||
Reference in New Issue
Block a user