diff options
author | Tyson <Tyson@Ultrabook2> | 2014-02-07 23:31:59 -0600 |
---|---|---|
committer | Tyson <Tyson@Ultrabook2> | 2014-02-07 23:31:59 -0600 |
commit | 40ab574dad67091df4517ecac445ce466cf07395 (patch) | |
tree | 7a5b7caace93db94b5fb57dca6d5df72e59ebb87 /pygments/lexers/templates.py | |
parent | 76830a64b219cc2fd76b7ae7de12b717375a6793 (diff) | |
download | pygments-40ab574dad67091df4517ecac445ce466cf07395.tar.gz |
Added separate lexer to handle CFC. It can handle both tag and script based CFCs.
Diffstat (limited to 'pygments/lexers/templates.py')
-rw-r--r-- | pygments/lexers/templates.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 7c7a4546..abd5648c 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -36,9 +36,10 @@ __all__ = ['HtmlPhpLexer', 'XmlPhpLexer', 'CssPhpLexer', 'MakoCssLexer', 'JspLexer', 'CheetahLexer', 'CheetahHtmlLexer', 'CheetahXmlLexer', 'CheetahJavascriptLexer', 'EvoqueLexer', 'EvoqueHtmlLexer', 'EvoqueXmlLexer', 'ColdfusionLexer', - 'ColdfusionHtmlLexer', 'VelocityLexer', 'VelocityHtmlLexer', - 'VelocityXmlLexer', 'SspLexer', 'TeaTemplateLexer', 'LassoHtmlLexer', - 'LassoXmlLexer', 'LassoCssLexer', 'LassoJavascriptLexer'] + 'ColdfusionHtmlLexer', 'ColdfusionCFCLexer', 'VelocityLexer', + 'VelocityHtmlLexer', 'VelocityXmlLexer', 'SspLexer', + 'TeaTemplateLexer', 'LassoHtmlLexer', 'LassoXmlLexer', + 'LassoCssLexer', 'LassoJavascriptLexer'] class ErbLexer(Lexer): @@ -1558,7 +1559,7 @@ class ColdfusionHtmlLexer(DelegatingLexer): """ name = 'Coldfusion HTML' aliases = ['cfm'] - filenames = ['*.cfm', '*.cfml', '*.cfc'] + filenames = ['*.cfm', '*.cfml'] mimetypes = ['application/x-coldfusion'] def __init__(self, **options): @@ -1566,6 +1567,20 @@ class ColdfusionHtmlLexer(DelegatingLexer): **options) +class ColdfusionCFCLexer(DelegatingLexer): + """ + Coldfusion markup/script components + """ + name = 'Coldfusion CFC' + aliases = ['cfc'] + filenames = ['*.cfc'] + mimetypes = ['application/x-coldfusion'] + + def __init__(self, **options): + super(ColdfusionCFCLexer, self).__init__(ColdfusionHtmlLexer, ColdfusionLexer, + **options) + + class SspLexer(DelegatingLexer): """ Lexer for Scalate Server Pages. |