diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2020-12-29 09:48:53 +0100 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2020-12-29 09:48:53 +0100 |
commit | d7dcc6dfb392fd3b256196ae34c70b07d155b3dd (patch) | |
tree | 3a568ab6759d74e34a598b2caf33dde183bd1aab | |
parent | 23f9a8be707ec4ff211bbc0d43223cb24f0e0c44 (diff) | |
download | pygments-git-d7dcc6dfb392fd3b256196ae34c70b07d155b3dd.tar.gz |
Fix #1652.
in is a keyword in Bash, ZSH, and KSH.
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pygments/lexers/shell.py | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -25,6 +25,7 @@ Version 2.7.4 - Lex trailing whitespace as part of the prompt in shell lexers (#1645) - Add missing ONLY keyword to Fortran (#1635) - Add missing regex flags to JS/TS/... lexers (#1647) +- Add missing ``in`` keyword to shell (#1652) Thanks to Google's OSS-Fuzz project for finding many of these bugs. diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index daef1f39..e9dd3796 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -57,7 +57,7 @@ class BashLexer(RegexLexer): (r'\$', Text), ], 'basic': [ - (r'\b(if|fi|else|while|do|done|for|then|return|function|case|' + (r'\b(if|fi|else|while|in|do|done|for|then|return|function|case|' r'select|continue|until|esac|elif)(\s*)\b', bygroups(Keyword, Text)), (r'\b(alias|bg|bind|break|builtin|caller|cd|command|compgen|' |