feat(sdk): strip fenced code blocks before UAT item scan (#3184)
Cycle 6 of ~15: adds fenced-block stripping pass to stripMarkdownInjection. Docs-and-examples inside code fences no longer pollute the item roster. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,8 @@ interface UatItem {
|
||||
function stripMarkdownInjection(content: string): string {
|
||||
// Pass 1: strip YAML frontmatter region (---\n...\n---)
|
||||
let s = content.replace(/^---\r?\n[\s\S]*?\r?\n---/m, '');
|
||||
// Pass 2: strip fenced code blocks (``` ... ```)
|
||||
s = s.replace(/```[\s\S]*?```/g, '');
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user