Skip to content

Commit

Permalink
Fix #1652.
Browse files Browse the repository at this point in the history
in is a keyword in Bash, ZSH, and KSH.
  • Loading branch information
Anteru committed Dec 29, 2020
1 parent 23f9a8b commit d7dcc6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/shell.py
Expand Up @@ -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|'
Expand Down

0 comments on commit d7dcc6d

Please sign in to comment.