parent
87937a457d
commit
8dbdf94bf0
11
mode/rst.py
11
mode/rst.py
|
@ -40,8 +40,7 @@ class RSTGrammar(Grammar):
|
||||||
PatternRule(r'lineblock', r'^\|'),
|
PatternRule(r'lineblock', r'^\|'),
|
||||||
RegionRule(r'blocktest', r'>>>', PythonGrammar, '^\n'),
|
RegionRule(r'blocktest', r'>>>', PythonGrammar, '^\n'),
|
||||||
OverrideRegionRule(r'code', r'^\.\. code-block:: +(?P<grammar>.+)\n$', None, r'^[^\n ]'),
|
OverrideRegionRule(r'code', r'^\.\. code-block:: +(?P<grammar>.+)\n$', None, r'^[^\n ]'),
|
||||||
RegionRule(r'literal_block', r'::\n$', Grammar, r'^[^\n ]'),
|
RegionRule(r'literal_block', r'::\n$', Grammar, r'^(?=[^\n ])'),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
class RstWrapParagraph(method.WrapParagraph):
|
class RstWrapParagraph(method.WrapParagraph):
|
||||||
|
@ -55,10 +54,10 @@ class RST(mode.Fundamental):
|
||||||
extensions = ['.rst']
|
extensions = ['.rst']
|
||||||
grammar = RSTGrammar
|
grammar = RSTGrammar
|
||||||
colors = {
|
colors = {
|
||||||
'title': ('blue', 'default', 'bold'),
|
'title': ('blue', 'default', 'bold'),
|
||||||
'subtitle': ('blue', 'default'),
|
'subtitle': ('blue', 'default'),
|
||||||
'field': ('green', 'default', 'bold'),
|
'field': ('green', 'default', 'bold'),
|
||||||
'option': ('green', 'default', 'bold'),
|
'option': ('green', 'default', 'bold'),
|
||||||
'anonymous': ('blue', 'default', 'bold'),
|
'anonymous': ('blue', 'default', 'bold'),
|
||||||
'reference': ('blue', 'default', 'bold'),
|
'reference': ('blue', 'default', 'bold'),
|
||||||
'footnote': ('blue', 'default', 'bold'),
|
'footnote': ('blue', 'default', 'bold'),
|
||||||
|
|
Loading…
Reference in New Issue