fix(archie): use 4-backtick fence in comment template to avoid literal backslashes in Mermaid blocks - #381
Open
xpepper wants to merge 1 commit into
Open
Conversation
…l backslashes in Mermaid blocks
There was a problem hiding this comment.
🟢 Approval recommended
The change is a small, correct Markdown fencing fix that aligns the example with CommonMark/GFM behavior and has no apparent side effects.
Pull request overview
Updates the Archie workflow documentation template so Mermaid code fences in the “Comment Structure” example render correctly when copied into GitHub comments (and when injected into the agent prompt), avoiding backslash-escaped fences that break Mermaid rendering under CommonMark/GFM.
Changes:
- Switches the outer example block to a 4-backtick fenced code block (
markdown …) so inner triple-backtick Mermaid fences can be included unescaped. - Replaces
\```mermaid/ ```` with standardmermaid /inside the example template.
File summaries
| File | Description |
|---|---|
| workflows/archie.md | Adjusts the documentation prompt template to use a 4-backtick outer fence so Mermaid blocks can be shown without backslash escapes. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Problem
In
workflows/archie.md, the "Comment Structure" example prompt currently uses backslash escapes on nested Mermaid fences (\```mermaid/\```) inside a standard 3-backtick```markdowncode block:Because
gh-awinjects the workflow Markdown directly into the agent's prompt context at runtime, the LLM receives literal\```mermaid. The LLM frequently copies this formatting verbatim into its output comments.Under GitHub Flavored Markdown (CommonMark), a backslash before backticks is treated as a character escape. The fence is parsed as a plain paragraph (
<p>```mermaid ...</p>) rather than a<div class="highlight highlight-source-mermaid">block, causing GitHub to render literal text instead of an interactive Mermaid diagram.Solution
Per CommonMark Spec §4.5, an outer code block with$N$ backticks can contain inner code blocks of $N-1$ backticks without escaping.
````markdown ... ````).```mermaidand```fences inside.This delivers clean, idiomatic Mermaid blocks in the model's prompt with zero backslashes, ensuring generated issue/PR comments render diagrams properly on GitHub.