1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-04-17 11:56:39 +02:00

Switch shell #! to preproc.

This commit is contained in:
Alec Thomas 2017-10-03 16:42:44 +11:00
parent fd7f3ef183
commit 92586fdff2

View File

@ -34,7 +34,7 @@ var Bash = Register(MustNewLexer(
"basic": {
{`\b(if|fi|else|while|do|done|for|then|return|function|case|select|continue|until|esac|elif)(\s*)\b`, ByGroups(Keyword, Text), nil},
{"\\b(alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|time|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)(?=[\\s)`])", NameBuiltin, nil},
{`\A#!.+\n`, CommentHashbang, nil},
{`\A#!.+\n`, CommentPreproc, nil},
{`#.*\n`, CommentSingle, nil},
{`\\[\w\W]`, LiteralStringEscape, nil},
{`(\b\w+)(\s*)(\+?=)`, ByGroups(NameVariable, Text, Operator), nil},