summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-04-22 10:16:28 +0200
committerGeorg Brandl <georg@python.org>2014-04-22 10:16:28 +0200
commitff18c358cca16f8891cf9897753c156782ce5462 (patch)
tree02b049ef36ed472efce54366692ae37e946aa929 /pygments
parent32004b6bdf8c0b82de6606e7610477c01fa38877 (diff)
parent676b1bd95c9b2362686fb0c623c4ffb84aac7e38 (diff)
downloadpygments-ff18c358cca16f8891cf9897753c156782ce5462.tar.gz
Merged in jaingaurav2/pygments-main-898 (pull request #332)
Improvements to bash lexing of numbers with base syntax
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/shell.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py
index b069b375..c07ff6ee 100644
--- a/pygments/lexers/shell.py
+++ b/pygments/lexers/shell.py
@@ -71,8 +71,8 @@ class BashLexer(RegexLexer):
(r'&', Punctuation),
(r'\|', Punctuation),
(r'\s+', Text),
- (r'[^=\s\[\]{}()$"\'`\\<&|;]+', Text),
(r'\d+(?= |\Z)', Number),
+ (r'[^=\s\[\]{}()$"\'`\\<&|;]+', Text),
(r'\$#?(\w+|.)', Name.Variable),
(r'<', Text),
],
@@ -91,6 +91,8 @@ class BashLexer(RegexLexer):
'math': [
(r'\)\)', Keyword, '#pop'),
(r'[-+*/%^|&]|\*\*|\|\|', Operator),
+ (r'\d+#\d+', Number),
+ (r'\d+#(?! )', Number),
(r'\d+', Number),
include('root'),
],