Preserve closing XML tag in raw string literal snippet output#54651
Draft
BillWagner with Copilot wants to merge 3 commits into
Draft
Preserve closing XML tag in raw string literal snippet output#54651BillWagner with Copilot wants to merge 3 commits into
BillWagner with Copilot wants to merge 3 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix missing closing
Preserve closing XML tag in raw string literal snippet output
Jul 6, 2026
order tag in XML example
BillWagner
reviewed
Jul 6, 2026
Comment on lines
+70
to
+72
| // <order id="42"> | ||
| // <item>book</item> | ||
| // </order> | ||
| // Output: </order> |
Member
There was a problem hiding this comment.
@copilot The previous change didn't work.
Try if a comment block using /* and `*/ comment markers works with the docs build system.
Contributor
Author
There was a problem hiding this comment.
Updated in 12f4691. The snippet now uses a block comment for the sample output so the closing </order> line doesn't match the snippet terminator format.
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.
The raw string literal article showed an incomplete XML output example in the indentation section. The final
</order>line was being treated as a snippet terminator instead of rendered sample output.Problem
raw-string-literalsomitted the closing XML tag from the displayed output.// </order>collided with the docs snippet marker format.Change
docs/csharp/fundamentals/strings/snippets/raw-string-literals/Program.csso the closing tag remains visible in rendered docs without changing the example logic or output.Result