Files
org-vim/runtime/syntax/testdir/input/sh_15.sh
Bozhidar Batsov c68e64dac3 runtime(sh): fix spurious nextgroup=shComment on shEscape
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.

Add a test case for escaped characters followed by # in double quotes.

fixes:  #19053
closes: #19414

Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-15 14:53:55 +00:00

14 lines
366 B
Bash

#!/bin/bash
# Issue #19053 (sh syntax: escaped characters followed by # in double quotes)
CLEANURL='http://localhost:8077/test'
FILENAME=$(sed -r -e "s#[:/]+#\.#g" -e "s#[^a-zA-Z0-9\._]*##g" <<<${CLEANURL})
FILENAME=$(sed -r -e 's#[:/]+#\.#g' -e 's#[^a-zA-Z0-9\._]*##g' <<<${CLEANURL})
HDRFILE="${FILENAME}.hdr"
: "\\# not a comment"
# \\" a comment
echo "\\#"
: