Skip to content

fix: preserve safe URL handling with markdown-it 15 attribute types - #78

Merged
sanskarIN merged 1 commit into
mainfrom
fix/markdown-it15-token-attributes
Nov 6, 2026
Merged

sanskarIN merged 1 commit into
mainfrom
fix/markdown-it15-token-attributes

Conversation

@sanskarIN

Copy link
Copy Markdown
Member

Motivation

Dependabot #75 upgrades markdown-it to 15.0.3, but its attrGet() return type now includes number; the current Scarp renderer expects string, so #75 fails TypeScript at scripts/scarp-site/markdown.ts lines 123 and 136.

Change

Narrow href and src token attributes to non-empty strings before passing to the documented URL sanitizer. This is compatible with the currently pinned markdown-it 14 runtime, preserves safe link handling, and prepares the renderer for markdown-it 15 without weakening the URL policy.

Gate

CI must pass on current pinned markdown-it 14 before merging. Then re-check #75 separately under markdown-it 15; do not merge that major update without a green browser/docs suite.

@sanskarIN
sanskarIN merged commit b5ef066 into main Nov 6, 2026
8 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