Skip to content

Fix footnote references crossing source newlines - #267

Merged
dereuromark merged 1 commit into
masterfrom
fix/footnote-label-newlines
Aug 12, 2026
Merged

Fix footnote references crossing source newlines#267
dereuromark merged 1 commit into
masterfrom
fix/footnote-label-newlines

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

Summary

  • stop footnote-reference labels at LF or CR
  • preserve same-line spaces and tabs exactly
  • cover LF, CRLF, CR, multiline definition markers, warnings, and rendered output

Why

Footnote definitions are line-based, but inline references previously accepted source newlines. That produced identifiers that no valid definition could bind.

Fixes the djot-php behavior reported in jgm/djot.js#146.

Verification

  • focused regression suite: 6 tests, 16 assertions
  • full composer check: 2,766 tests, 18,386 assertions; code style passes

@dereuromark
dereuromark merged commit 31096c3 into master Aug 12, 2026
4 checks passed
@dereuromark
dereuromark deleted the fix/footnote-label-newlines branch August 12, 2026 12:56
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.41%. Comparing base (20073dc) to head (6b08341).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #267   +/-   ##
=========================================
  Coverage     92.40%   92.41%           
  Complexity     3673     3673           
=========================================
  Files           109      109           
  Lines         10421    10421           
=========================================
+ Hits           9630     9631    +1     
+ Misses          791      790    -1     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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