More DataSpec tweaks

This commit is contained in:
str4d
2013-06-12 03:21:09 +00:00
parent c3669d71c6
commit bff4bb450f

View File

@@ -10,7 +10,7 @@ class DataSpecLexer(RegexLexer):
'root': [
(r'(\s*)(\+-)', bygroups(Text, Text), 'boundary'),
(r'(\s+)([\+|])', bygroups(Text, Text), 'content'),
(r'~', Generic.Strong, 'content'),
(r'(\s*)(~)', bygroups(Text, Generic.Strong), 'content'),
(r'(\s*)([\w=;]+)(\s)(::)(\s)', bygroups(Text, Name.Tag, Text, Operator, Text)),
(r'(\s*)((?:[A-Z][a-z]+)+)', bygroups(Text, Name.Class)),
(r'(\s*)([A-Z]{2,})', bygroups(Text, Name.Constant)),
@@ -22,11 +22,11 @@ class DataSpecLexer(RegexLexer):
(r'(\s*)([\w()-=\'<>]+)', bygroups(Text, Comment)),
],
'boundary': [
(r'---\+$', Text, '#pop'),
(r'(//)(-\+)?$', bygroups(Generic.Strong, Text), '#pop'),
(r'---\+-', Text),
(r'---\+\s', Text, '#pop', 'content'),
(r'(//)(-\+-)', bygroups(Generic.Strong, Text)),
(r'-{3,}\+$', Text, '#pop'),
(r'(-*)(//)(-+\+)?$', bygroups(Text, Generic.Strong, Text), '#pop'),
(r'-{3,}\+-', Text),
(r'-{3,}\+\s', Text, '#pop', 'content'),
(r'(-*)(//)(-+\+-)', bygroups(Text, Generic.Strong, Text)),
],
'content': [
(r'(\s*)([\+|])$', bygroups(Text, Text), '#pop'),