From code review of #22.
renderAsMarkdown() (src/extension.ts) wraps the rendered execution in a hardcoded 3-backtick fence:
function renderAsMarkdown(execution: Execution): string {
return '```\n' + renderOutputDocument(execution) + '\n```';
}
If the command or its captured output contains a literal ``` sequence (e.g. cat some-doc.md on a file with a fenced code block, output from a doc-generation tool, or output from another tool that itself uses fenced blocks), the fence closes early and everything after it renders as normal markdown instead of staying inside the code block when pasted - which directly undermines the feature's own stated purpose (pasting ground truth into an AI agent chat without losing layout to markdown reflow).
Neither of the two new tests uses output containing backticks, so this isn't caught.
Standard fix: use a fence longer than the longest backtick run found in the content (CommonMark allows any fence length ≥3) instead of a fixed 3.
From code review of #22.
renderAsMarkdown()(src/extension.ts) wraps the rendered execution in a hardcoded 3-backtick fence:If the command or its captured output contains a literal ``` sequence (e.g.
cat some-doc.mdon a file with a fenced code block, output from a doc-generation tool, or output from another tool that itself uses fenced blocks), the fence closes early and everything after it renders as normal markdown instead of staying inside the code block when pasted - which directly undermines the feature's own stated purpose (pasting ground truth into an AI agent chat without losing layout to markdown reflow).Neither of the two new tests uses output containing backticks, so this isn't caught.
Standard fix: use a fence longer than the longest backtick run found in the content (CommonMark allows any fence length ≥3) instead of a fixed 3.