summaryrefslogtreecommitdiff
path: root/pygments/lexers
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2017-01-30 07:42:59 +0100
committerGeorg Brandl <georg@python.org>2017-01-30 07:42:59 +0100
commit1aec641cfd9cb1a15a504d3d4b0a5f4092a593c3 (patch)
tree4b2c42660078e44f930b37c42c11ce064c1e4e76 /pygments/lexers
parent68cfbd6fb823f77b741be33109deab4936ac9fe5 (diff)
downloadpygments-1aec641cfd9cb1a15a504d3d4b0a5f4092a593c3.tar.gz
Xorg: add whitespace rule
Diffstat (limited to 'pygments/lexers')
-rw-r--r--pygments/lexers/xorg.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/lexers/xorg.py b/pygments/lexers/xorg.py
index 1344f6e5..89475a80 100644
--- a/pygments/lexers/xorg.py
+++ b/pygments/lexers/xorg.py
@@ -23,12 +23,14 @@ class XorgLexer(RegexLexer):
tokens = {
'root': [
+ (r'\s+', Text),
(r'#.*$', Comment),
+
(r'((|Sub)Section)(\s+)("\w+")',
bygroups(String.Escape, String.Escape, Text, String.Escape)),
(r'(End(|Sub)Section)', String.Escape),
- (r'(^(?!S|E|#)(|\s+)(?!Sec|End|Sub)\w+)(\s+)([^\n#]+)',
- bygroups(Name.Builtin, Text, Text, Name.Constant)),
+ (r'(\w+)(\s+)([^\n#]+)',
+ bygroups(Name.Builtin, Text, Name.Constant)),
],
}