Skip to content

footnotes: mark the number links and side note numbers as decorations, so text exports drop them - #3

Merged
ewels merged 1 commit into
mainfrom
fix/footnote-num-deco
Oct 5, 2026
Merged

ewels merged 1 commit into
mainfrom
fix/footnote-num-deco

Conversation

@ewels

@ewels ewels commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #2

With starlight-llms-txt set to drop .scb-deco, each footnote under a code block still came through with its back link (1. [1.](#scb-fnref-…)Needs uv on PATH.), because a.scb-footnote-num was not in the list of decorations. The number list of side annotations had the same problem: its scb-annotation-note-num span repeated the <ol> number (1. 1Runs it.).

Both are now in the decoration list in core.ts, so they get scb-deco and data-pagefind-ignore like the other decorations. The numbers still show on screen: scb-deco adds no styles. The text exports now read as plain numbered lists, and Pagefind no longer indexes the numbers.

  • New test in test/decorations.test.ts: with the decorations removed, each footnote item and side note reads as the note text only. It fails without the fix.
  • The starlight-llms-txt section of the plugin compatibility page now says the note lists stay as plain numbered lists.

I checked the other lists outside the code. The print list of annotations (scb-annotation-list) has plain items with no numbers or links. Callouts, popovers and footnote badges were already decorations.

pnpm lint, pnpm test, pnpm lint:docs and pnpm docs:build pass. docs/dist/llms-full.txt has no scb-fnref links now.

🤖 Generated with Claude Code

…, so text exports drop them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ewels
ewels merged commit 1dfabd3 into main Oct 5, 2026
3 checks passed
@ewels
ewels deleted the fix/footnote-num-deco branch October 5, 2026 10:28
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.

Footnote number links show up in starlight-llms-txt output

1 participant