Repository navigation
Conversation
Replace double-braced note-number placeholders with single-braced references while preserving assigned numbering and clickable PDF links. Keep legacy double braces literal, and update documentation and regression tests. Co-authored-by: Codex Web <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Exclude fenced code and inline code spans from footnote definition extraction, citation numbering, and named-reference interpolation. Render fenced lines literally in both PDF renderers and keep endnote grouping aligned with actual prose citations. Add regression coverage for backtick and tilde fences and inline code. Co-authored-by: Codex Web <noreply@openai.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{key}instead of{{key}}to insert an already-assigned Markdown footnote number into prose, without creating a new citation or changing its numbering.[^key]citation/definition syntax.{{key}}as{7}.Why simplify the syntax?
I originally used two pairs of braces to make note-number references stand out visually in raw Markdown. That distinction was useful when scanning the text as a human, but it is not necessary when a machine resolves and replaces the placeholders. A single pair of braces is simpler to type, read, and maintain, while the named reference still unambiguously identifies the assigned footnote number.
Example
If
smithis assigned note 7, the second paragraph renders “See supra note 7.” with7linked to the actual footnote.Code-block safety
Footnote numbers must come from actual prose citations, not examples of Markdown syntax. The compiler now preserves literal
{key}placeholders,[^key]citations, and[^key]:definitions inside fenced code blocks. Both backtick and tilde fences are recognized, including longer delimiters. Inline backtick code spans are also protected from interpolation and citation numbering. This is enforced when extracting definitions, assigning numbers, rendering both PDF modes, and grouping endnotes by section.Regression tests cover fenced code, inline code, longer backtick/tilde fences, preserved code-only definitions, and correct endnote sections.
Compatibility and verification
This is an intentional source-syntax change: existing documents that use
{{key}}must change those references to{key}. Such legacy expressions remain visible rather than being half-interpolated.Verified the committed tree differs from
main, and reviewed the three-file diff. Added regression coverage and performed focused fence/inline-code helper smoke checks, but the full Python test suite was not executed in this environment.