summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/text.py25
-rw-r--r--pygments/styles/fruity.py3
2 files changed, 26 insertions, 2 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 3ba07da5..e93f7435 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -60,9 +60,30 @@ class SourcesListLexer(RegexLexer):
tokens = {
'root': [
+ (r'\s+', Text),
(r'#.*?$', Comment),
- (r'(deb(?:-src)?)(\s+)(\S+)(\s+)(\S+)([^#\n]*)',
- bygroups(Name.Builtin, Text, Name.Class, Text, String, Text))
+ (r'^(deb(?:-src)?)(\s+)',
+ bygroups(Keyword, Text), 'distribution')
+ ],
+ 'distribution': [
+ (r'#.*?$', Comment, '#pop'),
+ (r'\$\(ARCH\)', Name.Variable),
+ (r'[^\s$[]+', String),
+ (r'\[', String.Other, 'escaped-distribution'),
+ (r'\$', String),
+ (r'\s+', Text, 'components')
+ ],
+ 'escaped-distribution': [
+ (r'\]', String.Other, '#pop'),
+ (r'\$\(ARCH\)', Name.Variable),
+ (r'[^\]$]+', String.Other),
+ (r'\$', String.Other)
+ ],
+ 'components': [
+ (r'#.*?$', Comment, '#pop:2'),
+ (r'$', Text, '#pop:2'),
+ (r'\s+', Text),
+ (r'\S+', Keyword.Pseudo),
]
}
diff --git a/pygments/styles/fruity.py b/pygments/styles/fruity.py
index fff1072b..b2991b9c 100644
--- a/pygments/styles/fruity.py
+++ b/pygments/styles/fruity.py
@@ -20,8 +20,11 @@ class FruityStyle(Style):
Token: '#ffffff',
Generic.Output: '#444444 bg:#222222',
Keyword: '#fb660a bold',
+ Keyword.Pseudo: 'nobold',
Number: '#0086f7 bold',
Name.Tag: '#fb660a bold',
+ Name.Variable: '#fb660a',
+ Name.Constant: '#fb660a',
Comment: '#008800 bg:#0f140f italic',
Name.Attribute: '#ff0086 bold',
String: '#0086d2',