Scope markdown 4-backtick fence rule to true nested-fence cases#26506
Merged
Scope markdown 4-backtick fence rule to true nested-fence cases#26506
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bb95e8fd-1cb7-4f5b-a665-8b5747a10f8b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix over-application of 4-backtick rule for code blocks
Scope markdown 4-backtick fence rule to true nested-fence cases
Apr 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Narrows the markdown fence selection guidance so models only emit 4-backtick fences when a code block literally contains embedded triple-backtick fences, avoiding GitHub rendering issues for standalone fenced blocks (e.g., mermaid).
Changes:
- Replaced the overly broad “outer blocks containing nested code blocks” guidance with an explicit conditional rule for when to use 4-backtick vs 3-backtick fences.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/md/markdown.md | Refines the markdown-generation rule to use 4-backtick fences only for true literal nested-fence cases. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
This was referenced Apr 15, 2026
Closed
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 markdown guidance was too broad and caused models to emit 4-backtick fences for standalone blocks (e.g.,
mermaid), which breaks GitHub rendering. This change narrows the rule so 4-backticks are only used when block content literally includes triple-backtick fences.Problem refinement
actions/setup/md/markdown.mdto remove ambiguous “outer nested code block” interpretation.fences; otherwise use standardfences.Prompt contract update