diff options
author | Tim Hatch <tim@timhatch.com> | 2014-04-24 15:40:36 -0400 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-04-24 15:40:36 -0400 |
commit | 0c7f160e848d472bbe8f0e277b4f11dece859cc0 (patch) | |
tree | ca96e59dc63eccbbce1bdb0ae87577d9e9d78957 /pygments/lexers/shell.py | |
parent | 9ca27c93bd28d0f76f9cd30f7a9a6b2c822bf473 (diff) | |
download | pygments-0c7f160e848d472bbe8f0e277b4f11dece859cc0.tar.gz |
Fix PanLexer and TcshLexer to allow inline comments without whitespace
Diffstat (limited to 'pygments/lexers/shell.py')
-rw-r--r-- | pygments/lexers/shell.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index c07ff6ee..f809dae9 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -296,17 +296,18 @@ class TcshLexer(RegexLexer): r'umask|unalias|uncomplete|unhash|universe|unlimit|unset|unsetenv|' r'ver|wait|warp|watchlog|where|which)\s*\b', Name.Builtin), - (r'#.*\n', Comment), + (r'#.*', Comment), (r'\\[\w\W]', String.Escape), (r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Text, Operator)), (r'[\[\]{}()=]+', Operator), (r'<<\s*(\'?)\\?(\w+)[\w\W]+?\2', String), + (r';', Punctuation), ], 'data': [ (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double), (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single), (r'\s+', Text), - (r'[^=\s\[\]{}()$"\'`\\]+', Text), + (r'[^=\s\[\]{}()$"\'`\\;#]+', Text), (r'\d+(?= |\Z)', Number), (r'\$#?(\w+|.)', Name.Variable), ], |