Skip to content

Footnotes: Fix assert when a reference appears inside a wiki-link destination. - #348

Merged
mity merged 3 commits into
mity:masterfrom
hryhoriiK97:fix/wiki-link-footnote-ref
May 24, 2026
Merged

mity merged 3 commits into
mity:masterfrom
hryhoriiK97:fix/wiki-link-footnote-ref

Conversation

@hryhoriiK97

@hryhoriiK97 hryhoriiK97 commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes an assert when --ffootnotes and --fwiki-links are both on and a [^label] ref appears inside a [[dest|label]] destination (e.g. [[[^|]]]).

md_disable_marks() used an empty range, so footnote marks in the destination stayed active and rendering could hit the ] closer before the opener. The fix uses the correct range, clears disabled marks, and disables the footnote’s paired ] when it sits past the |.

@codecov

codecov Bot commented May 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.00%. Comparing base (589681b) to head (759a454).

Files with missing lines Patch % Lines
src/md4c.c 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #348      +/-   ##
==========================================
+ Coverage   78.97%   79.00%   +0.02%     
==========================================
  Files           5        5              
  Lines        3743     3748       +5     
  Branches     1258     1260       +2     
==========================================
+ Hits         2956     2961       +5     
  Misses        293      293              
  Partials      494      494              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mity
mity merged commit 326fe25 into mity:master May 24, 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.

2 participants