Repository navigation
Support metadata on full-file URL snippets - #850
Merged
Merged
Conversation
Parse parenthesized metadata on full-file HTTP(S) snippet references without altering the URL used for download, caching, anchors, links, or missing-snippet reporting. A leading lang= token overrides the language inferred from the file extension, and remaining metadata is emitted as Expressive Code metadata. Metadata without lang= keeps the inferred language. Reuse the source-snippet language parser so empty and invalid lang= values raise the same SnippetReadingException and diagnostics as existing snippet metadata. Preserve metadata when rewriting generated markers and apply overrides only to full-file URL references. Add coverage for language-only and Expressive Code metadata, metadata-only directives, URL queries and fragments, invalid-language errors, and in-place rewrites. Document the syntax in readme.source.md and its generated readme.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Enhances the original resolution for #740 |
SimonCropp
pushed a commit
that referenced
this pull request
Sep 26, 2026
Parse parenthesized metadata on full-file HTTP(S) snippet references without altering the URL used for download, caching, anchors, links, or missing-snippet reporting. A leading lang= token overrides the language inferred from the file extension, and remaining metadata is emitted as Expressive Code metadata. Metadata without lang= keeps the inferred language. Reuse the source-snippet language parser so empty and invalid lang= values raise the same SnippetReadingException and diagnostics as existing snippet metadata. Preserve metadata when rewriting generated markers and apply overrides only to full-file URL references. Add coverage for language-only and Expressive Code metadata, metadata-only directives, URL queries and fragments, invalid-language errors, and in-place rewrites. Document the syntax in readme.source.md and its generated readme.md.
This was referenced Sep 28, 2026
Merged
Open
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.
Parse parenthesized metadata on full-file HTTP(S) snippet references without altering the URL used for download, caching, anchors, links, or missing-snippet reporting. A leading lang= token overrides the language inferred from the file extension, and remaining metadata is emitted as Expressive Code metadata. Metadata without lang= keeps the inferred language.
Reuse the source-snippet language parser so empty and invalid lang= values raise the same SnippetReadingException and diagnostics as existing snippet metadata. Preserve metadata when rewriting generated markers and apply overrides only to full-file URL references.
Add coverage for language-only and Expressive Code metadata, metadata-only directives, URL queries and fragments, invalid-language errors, and in-place rewrites. Document the syntax in readme.source.md and its generated readme.md.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com