Repository navigation
Fix empty bibliography rendering and the index-term leak - #17
Merged
Merged
Conversation
Every document rendered a bare "Bibliography" heading with all entries dropped: the sections lacked the [bibliography] marker, and entries without a [[[id,text]]] anchor are silently discarded by metanorma. Entries now carry the marker and anchors - real relaton fetches for the JCGM documents, nofetch() for everything else, one anchor per entry (multi-anchor entries render their later displays empty). The stray "Index" section holding garbage terms came from the index-term capture of ((...)) inside backtick code spans; the affected formula spans are now stem:[] (math content) or pass:[] (the bare (( token). The register validator gains a bibliography pass so this defect class fails CI instead of rendering: missing [bibliography] markers, unanchored entries, multi-anchor entries, and unbalanced nofetch( parentheses.
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
Validating the rendered documents found every one of them ending at a bare "Bibliography" heading — all entries dropped — plus a stray "Index" section full of garbage terms.
Root causes and fixes:
[bibliography]marker, and metanorma silently discards entries without a[[[id,text]]]anchor. All 12 sections across pm-1001..1006 now carry the marker and anchored entries — real relaton fetches for JCGM documents,nofetch(...)for everything else, one anchor per entry (multi-anchor entries render their later displays as empty[]chips).JCGM 100:2008 + Amd.1:2026citation is not a fetchable docid; now cites the base JCGM 100:2008 with the amendment named in prose (the register convention).((...))as index terms even inside backtick code spans, so formula fragments (((n(n+1))/2)^2) leaked into the document index. The affected spans are nowstem:[](math content) orpass:[](the bare((token) — verified: the Index section no longer renders at all.scripts/validate-register.rb): new bibliography checks — missing[bibliography]markers, unanchored entries, multi-anchor entries, unbalancednofetch(— negative-tested against the pre-fix markup, all three classes caught.Verified locally: all six documents compile; every bibliography entry renders; no
[ ]/NO INFORMATION AVAILABLEchips; no Index section; JCGM anchors parse (JCGM fetches resolve from the local cache; CI fetches live).Test plan
metanorma compileof all six parts — Bibliography sections fully populated, no Index garbageruby scripts/validate-register.rb— VALIDATION OK (6 documents)