Skip to content

Commit e11b70c

Browse files
vgrichinaclaude
andcommitted
Fix apply-md regex to handle language identifiers with slashes
Modified the regex pattern to include forward slashes in the language identifier, allowing the script to properly handle code blocks with identifiers like 'image/svg+xml'. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d0c2aaf commit e11b70c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apply-md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extract_blocks() {
4646
local temp_file=""
4747

4848
echo "$MARKDOWN" | while IFS= read -r line; do
49-
if [[ "$line" =~ ^[[:space:]]*\`\`\`([a-zA-Z0-9\+\-]+)[[:space:]]+(.+) ]]; then
49+
if [[ "$line" =~ ^[[:space:]]*\`\`\`([a-zA-Z0-9\+\-\/]+)[[:space:]]+(.+) ]]; then
5050
current_file="${BASH_REMATCH[2]}"
5151
in_block=true
5252
temp_file="$TEMP_DIR/$current_file"

0 commit comments

Comments
 (0)