parent
0806e467fe
commit
86ea8ad835
|
@ -18,6 +18,11 @@ LineGrammar.rules = [
|
||||||
PatternRule('eol', r'\n'),
|
PatternRule('eol', r'\n'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class WordGrammar(Grammar): pass
|
||||||
|
WordGrammar.rules = [
|
||||||
|
PatternRule('word', r'[A-Za-z0-9_]+'),
|
||||||
|
]
|
||||||
|
|
||||||
class MarkdownGrammar(Grammar): pass
|
class MarkdownGrammar(Grammar): pass
|
||||||
MarkdownGrammar.rules = [
|
MarkdownGrammar.rules = [
|
||||||
PatternRule('md.head1', r'^#.+'),
|
PatternRule('md.head1', r'^#.+'),
|
||||||
|
@ -56,7 +61,7 @@ MarkdownGrammar.rules = [
|
||||||
RegionRule('md.tt', r'``', MarkdownGrammar, r'``'),
|
RegionRule('md.tt', r'``', MarkdownGrammar, r'``'),
|
||||||
|
|
||||||
RegionRule('md.bold', r'\*', MarkdownGrammar, r'\*'),
|
RegionRule('md.bold', r'\*', MarkdownGrammar, r'\*'),
|
||||||
RegionRule('md.tt', r'`', MarkdownGrammar, r'`'),
|
RegionRule('md.tt', r'`', WordGrammar, r'`'),
|
||||||
|
|
||||||
PatternRule('md.escaped', r'\\.'),
|
PatternRule('md.escaped', r'\\.'),
|
||||||
PatternRule('md.word', r'[a-zA-Z\'"\-]+'),
|
PatternRule('md.word', r'[a-zA-Z\'"\-]+'),
|
||||||
|
@ -145,6 +150,7 @@ class Markdown(Fundamental):
|
||||||
'md.bold.end': hi_orange,
|
'md.bold.end': hi_orange,
|
||||||
|
|
||||||
'md.tt.start': lo_orange,
|
'md.tt.start': lo_orange,
|
||||||
|
'md.tt.word': lo_orange,
|
||||||
'md.tt.null': lo_orange,
|
'md.tt.null': lo_orange,
|
||||||
'md.tt.md.word': lo_orange,
|
'md.tt.md.word': lo_orange,
|
||||||
'md.tt.end': lo_orange,
|
'md.tt.end': lo_orange,
|
||||||
|
|
Loading…
Reference in New Issue