Skip to content

Commit dfed98e

Browse files
worktrunk-botclaude
andcommitted
fix(skill): warn about code fence collisions in suggestion blocks
When a suggestion's target range includes a line that is itself triple backticks (a code fence marker), GitHub's suggestion syntax collides with the content. This caused a broken suggestion on PR #1322 where applying it would have eaten the closing code fence. Add explicit guidance to exclude fence marker lines from the range or reproduce them in the suggestion body. Closes #1326 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 691060e commit dfed98e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.claude/skills/review-pr/SKILL.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ description: new text here
332332
range that's too wide can delete correct code adjacent to the bug. Before
333333
posting, verify that every line in [`start_line`, `line`] is either removed
334334
or rewritten in the suggestion body.
335+
- **Code fence collision**: When the target range includes a line that is
336+
itself ` ``` ` (a code fence marker), the suggestion's own ` ``` `
337+
delimiters collide with it. Either exclude the fence marker line from the
338+
range, or reproduce it verbatim in the suggestion body so it is preserved
339+
when the suggestion is applied.
335340
336341
### 5. Monitor CI
337342

0 commit comments

Comments
 (0)