summaryrefslogtreecommitdiff
path: root/pygments/lexers/xorg.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/xorg.py')
-rw-r--r--pygments/lexers/xorg.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/lexers/xorg.py b/pygments/lexers/xorg.py
index 89475a80..3bba930f 100644
--- a/pygments/lexers/xorg.py
+++ b/pygments/lexers/xorg.py
@@ -16,6 +16,7 @@ __all__ = ['XorgLexer']
class XorgLexer(RegexLexer):
+ """Lexer for xorg.conf file."""
name = 'Xorg'
aliases = ['xorg.conf']
filenames = ['xorg.conf']
@@ -26,8 +27,8 @@ class XorgLexer(RegexLexer):
(r'\s+', Text),
(r'#.*$', Comment),
- (r'((|Sub)Section)(\s+)("\w+")',
- bygroups(String.Escape, String.Escape, Text, String.Escape)),
+ (r'((?:Sub)?Section)(\s+)("\w+")',
+ bygroups(String.Escape, Text, String.Escape)),
(r'(End(|Sub)Section)', String.Escape),
(r'(\w+)(\s+)([^\n#]+)',