IMP-14b: also strip orphan cite keys from paper_final.md#287
Open
youwangd wants to merge 1 commit into
Open
Conversation
Stage 22 currently strips orphan \cite{...} keys from paper.tex
when they have no matching @entry in references.bib (IMP-14), but
paper_final.md is left unrepaired. Users who consume the markdown
deliverable see citations to keys that do not resolve.
This change mirrors the IMP-14 stripping for the markdown variant.
The .md uses [key1, key2] markdown-style citations rather than
\cite{...}, so we conservatively only touch brackets whose entire
content matches a comma-separated list of cite-key-shaped tokens
(lowercase-author + 4-digit-year + lowercase suffix). Markdown
links like [text](url) and other brackets are left untouched.
Adds 5 tests in TestIMP14b_StripOrphanedCitesFromMarkdown covering:
mixed keys, all-missing, link preservation, real-world paper
pattern, and no-op cases. Existing IMP-14 .tex tests untouched.
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.
Stage 22 currently strips orphan \cite{...} keys from paper.tex when they have no matching @entry in references.bib (IMP-14), but paper_final.md is left unrepaired. Users who consume the markdown deliverable see citations to keys that do not resolve.
This change mirrors the IMP-14 stripping for the markdown variant. The .md uses [key1, key2] markdown-style citations rather than \cite{...}, so we conservatively only touch brackets whose entire content matches a comma-separated list of cite-key-shaped tokens (lowercase-author + 4-digit-year + lowercase suffix). Markdown links like text and other brackets are left untouched.
Adds 5 tests in TestIMP14b_StripOrphanedCitesFromMarkdown covering: mixed keys, all-missing, link preservation, real-world paper pattern, and no-op cases. Existing IMP-14 .tex tests untouched.