Now handle any <<foo>> or <<foo,link text> anchor in norm rules#135
Merged
james-ball-qualcomm merged 1 commit intomainfrom Nov 27, 2025
Merged
Conversation
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the normative rules processing to handle any AsciiDoc anchor reference (e.g., <<foo>> or <<foo,link text>>) in normative rule tag text, not just those with the norm: prefix. This allows normative text to link to non-normative sections of the documentation.
Key changes:
- Removed duplicate
instances_strassignment that was overriding the conditional logic above it - Generalized regex patterns to match all anchor references instead of only
norm:prefixed ones - Simplified
tag2html_linkfunction to accept simple string parameters rather than complex objects
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/create_normative_rules.rb | Removed duplicate code, generalized anchor link handling from norm: prefix only to all anchors, and simplified the tag2html_link helper function |
| tests/norm-rule/test.yaml | Added test cases hyperlink3 and hyperlink4 to test non-normative anchor references |
| tests/norm-rule/test.adoc | Added test content with non-normative anchor references and the anchor target definition |
| tests/norm-rule/expected/test-norm-tags.json | Updated expected JSON output to include the new test cases |
| tests/norm-rule/expected/test-norm-rules.xlsx | Updated expected Excel output (binary file) |
| tests/norm-rule/expected/test-norm-rules.json | Updated expected JSON normative rules output with new test cases |
| tests/norm-rule/expected/test-norm-rules.html | Updated expected HTML output showing proper link generation for non-normative anchors |
| tests/norm-rule/expected/test-norm-rules.adoc | Updated expected AsciiDoc output with new test cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.