diff options
| -rwxr-xr-x | skills/writing-skills/render-graphs.js | 2 | ||||
| -rwxr-xr-x | tests/writing-skills/test-render-graphs.sh | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/skills/writing-skills/render-graphs.js b/skills/writing-skills/render-graphs.js index defe96e..09292c1 100755 --- a/skills/writing-skills/render-graphs.js +++ b/skills/writing-skills/render-graphs.js @@ -23,7 +23,7 @@ function extractDotBlocks(markdown) { let match; while ((match = regex.exec(markdown)) !== null) { - const content = match[1].replace(/\r\n/g, '\n').trim(); + const content = match[1].trim(); // Extract digraph name const nameMatch = content.match(/digraph\s+(\w+)/); diff --git a/tests/writing-skills/test-render-graphs.sh b/tests/writing-skills/test-render-graphs.sh index 6164bc8..a3142b7 100755 --- a/tests/writing-skills/test-render-graphs.sh +++ b/tests/writing-skills/test-render-graphs.sh @@ -116,13 +116,7 @@ case "${1:-}" in exit 0 ;; -Tsvg) - input="$(cat)" - case "$input" in - *$'\r'*) - echo "syntax error: unexpected carriage return" >&2 - exit 1 - ;; - esac + cat >/dev/null printf '<svg xmlns="http://www.w3.org/2000/svg"><g/></svg>\n' exit 0 ;; @@ -150,7 +144,7 @@ esac EOF chmod +x "$TEST_ROOT/fail-dot/dot" -# 1. CRLF SKILL.md extraction and normalization +# 1. CRLF SKILL.md extraction crlf_fixture="$TEST_ROOT/crlf-skill" mkdir -p "$crlf_fixture" printf -- '---\r\nname: crlf-skill\r\n---\r\n\r\n# CRLF Skill\r\n\r\n```dot\r\ndigraph crlf_graph {\r\n start -> end;\r\n}\r\n```\r\n' >"$crlf_fixture/SKILL.md" |
