From 311b2e48a49c49d9c8997069c8f5acf84cb0d110 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Thu, 9 Jul 2009 00:13:48 -0400 Subject: [PATCH] improved perl-blocks in tt --HG-- branch : pmacs2 --- mode/tt.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mode/tt.py b/mode/tt.py index 88be09f..e011103 100644 --- a/mode/tt.py +++ b/mode/tt.py @@ -23,23 +23,22 @@ prule = RegionRule('tt.directive', r'\[\%(?= *PERL)', PerlDirectiveGrammar, r'%%\]', PerlGrammar, r'\[%%', PerlDirectiveGrammar, '%%\]') class TagGrammar(Grammar): - rules = [crule, drule, prule] + mode.html.TagGrammar.rules + rules = [crule, prule, drule] + mode.html.TagGrammar.rules class JavascriptGrammar(Grammar): - rules = [crule, drule, prule] + mode.javascript.JavascriptGrammar.rules + rules = [crule, prule, drule] + mode.javascript.JavascriptGrammar.rules class CSSGrammar(Grammar): - rules = [crule, drule, prule] + mode.css.CSSGrammar.rules + rules = [crule, prule, drule] + mode.css.CSSGrammar.rules class CommentGrammar(Grammar): - rules = [crule, drule, prule] + mode.html.CommentGrammar.rules + rules = [crule, prule, drule] + mode.html.CommentGrammar.rules class CDataGrammar(Grammar): - rules = [crule, drule, prule] + mode.html.CDataGrammar.rules + rules = [crule, prule, drule] + mode.html.CDataGrammar.rules class MetadataGrammar(Grammar): - rules = [crule, drule, prule] + mode.html.MetadataGrammar.rules + rules = [crule, prule, drule] + mode.html.MetadataGrammar.rules class DoctypeGrammar(Grammar): - rules = [crule, drule, prule] + mode.html.DoctypeGrammar.rules + rules = [crule, prule, drule] + mode.html.DoctypeGrammar.rules class TemplateGrammar(Grammar): - rules = [ - crule, drule, prule, + rules = [crule, prule, drule] + [ PatternRule('escaped', '&[^;]+;'), PatternRule('html.data', r'[^\[&<]+'), PatternRule('html.data', '[^&<]+'), @@ -81,7 +80,7 @@ class Template(mode.Fundamental): 'tt.tag.string.null': ('green', 'default', 'bold'), 'tt.tag.string.end': ('green', 'default', 'bold'), 'tt.tag.end': ('default', 'default'), - 'tt.perl': ('red', 'default', 'bold'), + 'tt.perl': ('cyan', 'default', 'bold'), } _bindings = { 'close-paren': (')',),