parent
4ea1f53a46
commit
311b2e48a4
19
mode/tt.py
19
mode/tt.py
|
@ -23,23 +23,22 @@ prule = RegionRule('tt.directive', r'\[\%(?= *PERL)', PerlDirectiveGrammar,
|
||||||
r'%%\]', PerlGrammar, r'\[%%', PerlDirectiveGrammar, '%%\]')
|
r'%%\]', PerlGrammar, r'\[%%', PerlDirectiveGrammar, '%%\]')
|
||||||
|
|
||||||
class TagGrammar(Grammar):
|
class TagGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.html.TagGrammar.rules
|
rules = [crule, prule, drule] + mode.html.TagGrammar.rules
|
||||||
class JavascriptGrammar(Grammar):
|
class JavascriptGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.javascript.JavascriptGrammar.rules
|
rules = [crule, prule, drule] + mode.javascript.JavascriptGrammar.rules
|
||||||
class CSSGrammar(Grammar):
|
class CSSGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.css.CSSGrammar.rules
|
rules = [crule, prule, drule] + mode.css.CSSGrammar.rules
|
||||||
class CommentGrammar(Grammar):
|
class CommentGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.html.CommentGrammar.rules
|
rules = [crule, prule, drule] + mode.html.CommentGrammar.rules
|
||||||
class CDataGrammar(Grammar):
|
class CDataGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.html.CDataGrammar.rules
|
rules = [crule, prule, drule] + mode.html.CDataGrammar.rules
|
||||||
class MetadataGrammar(Grammar):
|
class MetadataGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.html.MetadataGrammar.rules
|
rules = [crule, prule, drule] + mode.html.MetadataGrammar.rules
|
||||||
class DoctypeGrammar(Grammar):
|
class DoctypeGrammar(Grammar):
|
||||||
rules = [crule, drule, prule] + mode.html.DoctypeGrammar.rules
|
rules = [crule, prule, drule] + mode.html.DoctypeGrammar.rules
|
||||||
|
|
||||||
class TemplateGrammar(Grammar):
|
class TemplateGrammar(Grammar):
|
||||||
rules = [
|
rules = [crule, prule, drule] + [
|
||||||
crule, drule, prule,
|
|
||||||
PatternRule('escaped', '&[^;]+;'),
|
PatternRule('escaped', '&[^;]+;'),
|
||||||
PatternRule('html.data', r'[^\[&<]+'),
|
PatternRule('html.data', r'[^\[&<]+'),
|
||||||
PatternRule('html.data', '[^&<]+'),
|
PatternRule('html.data', '[^&<]+'),
|
||||||
|
@ -81,7 +80,7 @@ class Template(mode.Fundamental):
|
||||||
'tt.tag.string.null': ('green', 'default', 'bold'),
|
'tt.tag.string.null': ('green', 'default', 'bold'),
|
||||||
'tt.tag.string.end': ('green', 'default', 'bold'),
|
'tt.tag.string.end': ('green', 'default', 'bold'),
|
||||||
'tt.tag.end': ('default', 'default'),
|
'tt.tag.end': ('default', 'default'),
|
||||||
'tt.perl': ('red', 'default', 'bold'),
|
'tt.perl': ('cyan', 'default', 'bold'),
|
||||||
}
|
}
|
||||||
_bindings = {
|
_bindings = {
|
||||||
'close-paren': (')',),
|
'close-paren': (')',),
|
||||||
|
|
Loading…
Reference in New Issue