diff options
author | Tim Hatch <tim@timhatch.com> | 2014-05-15 16:58:46 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-05-15 16:58:46 -0700 |
commit | 919938e38d438dbcba6ed64423fd8f7375a0f59e (patch) | |
tree | f99125be99b3f070f6dc166ff80a38004ed72377 /pygments | |
parent | 583ca505dcf138b05b99ee4bee9a545dd9130356 (diff) | |
parent | 3c8f0aed8af0456fc7834a681fe17c792c7dca1d (diff) | |
download | pygments-919938e38d438dbcba6ed64423fd8f7375a0f59e.tar.gz |
Merged in jaingaurav2/pygments-main (pull request #351)
Fix some lines to be within 90 characters
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/templates.py | 8 | ||||
-rw-r--r-- | pygments/lexers/text.py | 9 | ||||
-rw-r--r-- | pygments/lexers/web.py | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 46dac2a5..62d5da85 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -1536,7 +1536,7 @@ class ColdfusionMarkupLexer(RegexLexer): (r'<[^<>]*', Other), ], 'tags': [ - (r'(?s)<!---.*?--->', Comment.Multiline), + (r'<!---', Comment.Multiline, 'cfcomment'), (r'(?s)<!--.*?-->', Comment), (r'<cfoutput.*?>', Name.Builtin, 'cfoutput'), (r'(?s)(<cfscript.*?>)(.+?)(</cfscript.*?>)', @@ -1558,6 +1558,12 @@ class ColdfusionMarkupLexer(RegexLexer): (r'(?s)<[^<>]*', Other), (r'#', Other), ], + 'cfcomment': [ + (r'(?s)(.*?)(<!---)', + bygroups(Comment.Multiline, Comment.Multiline), '#push'), + (r'(?s)(.*?)(--->)', + bygroups(Comment.Multiline, Comment.Multiline), '#pop'), + ], } diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index f23c6980..d855ec79 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -17,6 +17,7 @@ from pygments.lexer import Lexer, LexerContext, RegexLexer, ExtendedRegexLexer, from pygments.token import Punctuation, Text, Comment, Keyword, Name, String, \ Generic, Operator, Number, Whitespace, Literal from pygments.util import get_bool_opt, ClassNotFound +from pygments.lexers.agile import PythonLexer from pygments.lexers.other import BashLexer __all__ = ['IniLexer', 'PropertiesLexer', 'SourcesListLexer', 'BaseMakefileLexer', @@ -835,8 +836,16 @@ class VimLexer(RegexLexer): mimetypes = ['text/x-vim'] flags = re.MULTILINE + _python = r'py(?:t(?:h(?:o(?:n)?)?)?)?' + tokens = { 'root': [ + (r'^([ \t:]*)(' + _python + r')([ \t]*)(<<)([ \t]*)(.*)((?:\n|.)*)(\6)', + bygroups(using(this), Keyword, Text, Operator, Text, Text, + using(PythonLexer), Text)), + (r'^([ \t:]*)(' + _python + r')([ \t])(.*)', + bygroups(using(this), Keyword, Text, using(PythonLexer))), + (r'^\s*".*', Comment), (r'[ \t]+', Text), diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index 2a80403a..550c6242 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -2499,6 +2499,7 @@ class CoffeeScriptLexer(RegexLexer): (r'"', String, '#pop'), (r'\\.|\'', String), # double-quoted string don't need ' escapes (r'#{', String.Interpol, "interpoling_string"), + (r'#', String), include('strings') ], 'sqs': [ @@ -2510,6 +2511,7 @@ class CoffeeScriptLexer(RegexLexer): (r'"""', String, '#pop'), (r'\\.|\'|"', String), # no need to escape quotes in triple-string (r'#{', String.Interpol, "interpoling_string"), + (r'#', String), include('strings'), ], 'tsqs': [ |