Skip to content

Fix: citation links matching edge cases#5614

Merged
OEvgeny merged 2 commits intomainfrom
fix/citation
Oct 13, 2025
Merged

Fix: citation links matching edge cases#5614
OEvgeny merged 2 commits intomainfrom
fix/citation

Conversation

@OEvgeny
Copy link
Copy Markdown
Collaborator

@OEvgeny OEvgeny commented Oct 13, 2025

Fixes #

Changelog Entry

  • Fixed citation links are not properly matched against markdown links, in PR #5614, by @OEvgeny

Description

Links are sanitized by micromark before we're matching them to citations. This PR adds a logic to apply the same sanitization for the citation links.

Design

We're reusing micromark-util-sanitize-uri which the engine is using to process links.

Specific Changes

  • renderMarkdown.ts to update link handling logic
  • added tests: citation/url.html and citation/url.fluent.html
  • updated package.json for bundle

-

  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@OEvgeny OEvgeny changed the title Fix: citation matching in edge cases Fix: citation matching edge cases Oct 13, 2025
@OEvgeny OEvgeny changed the title Fix: citation matching edge cases Fix: citation links matching edge cases Oct 13, 2025
@OEvgeny OEvgeny marked this pull request as ready for review October 13, 2025 18:32
@OEvgeny OEvgeny enabled auto-merge (squash) October 13, 2025 19:45
@OEvgeny OEvgeny disabled auto-merge October 13, 2025 20:03
@OEvgeny OEvgeny merged commit 7671e32 into main Oct 13, 2025
37 of 54 checks passed
@OEvgeny OEvgeny deleted the fix/citation branch October 13, 2025 20:04
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.

2 participants