fix: reword {{cite:id}} / {{fig:id}} in lutaml definitions to unbreak make CI#59
Merged
Merged
Conversation
The lutaml 0.10.x DSL parser's definition_body rule consumes any
character that is not "}", then expects a closing "}". When a
definition body contained "{{cite:id}}" or "{{fig:id}}" (the inline
mention syntax), the parser stopped at the first "}", produced a
truncated definition, then failed to match the rest.
This broke the `make` CI workflow on every commit since 0a13f26
(2026-06-11) — `images/*.png` regeneration failed on all four view
files (Concepts, ConceptSource, Designations, ManagedConcepts).
Five occurrences across three files reworded to the bare mention
form (cite:id, fig:id) — preserves semantic meaning without the
parser-hostile braces:
- models/concepts/ConceptSource.lutaml: 3 occurrences (3 lines)
- models/concepts/SharedNonVerbalEntity.lutaml: 1 occurrence
- models/concepts/BibliographyEntry.lutaml: 1 occurrence
Regenerated the four committed PNGs against lutaml 0.10.18.
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
The
makeworkflow has been failing on every commit since0a13f26(2026-06-11, 16+ commits back) because the lutaml 0.10.x DSL parser'sdefinition_bodyrule stops at the first}character. When adefinition { ... }block contained{{cite:id}}or{{fig:id}}(the inline mention syntax), the parser truncated the definition at the first}and failed to match the rest.Five occurrences across three files reworded to the bare mention form (
cite:id,fig:id) — preserves semantic meaning without parser-hostile braces:models/concepts/ConceptSource.lutaml— 3 occurrences (introduced by0a13f26)models/concepts/SharedNonVerbalEntity.lutaml— 1 occurrence (introduced by300b7c1)models/concepts/BibliographyEntry.lutaml— 1 occurrence (introduced by300b7c1)Regenerated the four tracked PNGs against lutaml 0.10.18.
Root cause
The body character class consumes anything that isn't
}, so{{cite:id}}ends the body at the first}of the}}pair, leaving a stray}that breaks the surroundingclass_bodyparse.Test plan
lutaml lml generate -t png -o /tmp/x.png views/ConceptSource.lutaml— succeedsConceptSource,Concepts,Designations,ManagedConcepts) generatemake— all 4 PNGs regenerate cleanly