Skip to content

Commit db82afb

Browse files
committed
fix: quote case patterns in lint workflow to prevent shell comment parsing
The lint workflow's "Check for broken relative links" step had a bash case statement where the `#*` pattern was being parsed as a shell comment, causing the `|*.svg*|*.shields.io*) continue ;;` continuation to be a syntax error. Quoting each pattern ("http*"|"https*"|"#*"|...) preserves the glob semantics while preventing the unquoted `#*` from being mis-parsed. Surfaced during Phase 2 Session D D-1 canary as the first PR to ever trigger this on:pull_request workflow. Closes #2. Signed-off-by: 154358121+TMHSDigital@users.noreply.github.com Made-with: Cursor
1 parent 04fb963 commit db82afb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/lint-markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
grep -oP '\[.*?\]\(\K[^)]+' "$file" | while read -r link; do
2323
# skip URLs, anchors, and badge images
2424
case "$link" in
25-
http*|https*|#*|*.svg*|*.shields.io*) continue ;;
25+
"http*"|"https*"|"#*"|"*.svg*"|"*.shields.io*") continue ;;
2626
esac
2727
# strip anchor from path
2828
path="${link%%#*}"

0 commit comments

Comments
 (0)