Skip to content

fix(export): footnote block edge cases and caption sanitizing - #23

Merged
jiro-by-nori[bot] merged 1 commit into
mainfrom
fix/export-footnote-blocks
Nov 13, 2026
Merged

jiro-by-nori[bot] merged 1 commit into
mainfrom
fix/export-footnote-blocks

Conversation

@jiro-by-nori

@jiro-by-nori jiro-by-nori Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #22 from code review, each with a failing test first:

  • A footnote opening with a list/blockquote gets its own <p>[n]</p> instead of numbering a later paragraph.
  • Footnote paragraphs are exempt from the duplicate-paragraph filter (two footnotes saying "See source." both survive; this was a new loss in fix(export): keep footnote and caption links, mentions, emphasis, and images #22).
  • Text loose beside a block in a footnote is wrapped in a paragraph instead of dropped.
  • Captions keep only a, em, i, strong, b, br; script/img/iframe etc. are removed.

Live post export (agentics-using-ai-should-be-joyful) is byte-identical to #22's. npm test 78/78, lint and tsc clean, dist rebuilt.

…nd loose footnote text, sanitize captions

Follow-up to #22 from review: [n] went onto the first <p> even when a list
came first; the duplicate-paragraph filter dropped a footnote whose text
matched another's; text loose beside a footnote block was lost; caption
markup was copied verbatim (now only a/em/i/strong/b/br survive).
@jiro-by-nori
jiro-by-nori Bot merged commit 045da13 into main Nov 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant