Skip to content

Commit b3ed525

Browse files
committed
Allow "function" names to include escaped spaces.
1 parent fedd6ca commit b3ed525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/jquery.syntax.brush.bash-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Syntax.register('bash-statement', function(brush) {
3737
// Probably need to write a real parser here rather than using regular expressions, it is too fragile
3838
// and misses lots of edge cases (e.g. nested brackets, delimiters).
3939
brush.push({
40-
pattern: /^\s*((?:\S+?=\$?(?:\[[^\]]+\]|\(\(.*?\)\)|"(?:[^"]|\\")+"|'(?:[^']|\\')+'|\S+)\s*)*)((?:\S+)?)/gmi,
40+
pattern: /^\s*((?:\S+?=\$?(?:\[[^\]]+\]|\(\(.*?\)\)|"(?:[^"]|\\")+"|'(?:[^']|\\')+'|\S+)\s*)*)((?:(\\ |\S)+)?)/gmi,
4141
matches: Syntax.extractMatches(
4242
{klass: 'env', allow: ['variable', 'string', 'operator', 'constant', 'expression']},
4343
{klass: 'function', allow: ['variable', 'string']}

0 commit comments

Comments
 (0)