diff options
author | Georg Brandl <georg@python.org> | 2010-01-30 19:44:18 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-01-30 19:44:18 +0100 |
commit | bc120d761ac1865632dd2b3a259b301662a1a6ab (patch) | |
tree | 4884a2a578adee8eae4d9a287ebd00e8042e4cf3 | |
parent | 9d89919df45baa70742b5aa4727ee3d90ced23a8 (diff) | |
download | pygments-bc120d761ac1865632dd2b3a259b301662a1a6ab.tar.gz |
Haml/Sass lexers: add "new in", changelog and authors entry.
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pygments/lexers/web.py | 19 |
3 files changed, 16 insertions, 5 deletions
@@ -61,6 +61,7 @@ Other contributors, listed alphabetically, are: * Jeremy Thurgood -- Erlang, Squid config lexers * Erick Tryzelaar -- Felix lexer * Whitney Young -- ObjectiveC lexer +* Nathan Weizenbaum -- Haml and Sass lexers * Dietmar Winkler -- Modelica lexer * Nils Winter -- Smalltalk lexer * Davy Wybiral -- Clojure lexer @@ -13,6 +13,7 @@ Version 1.3 * haXe * R console * Objective-J + * Haml and Sass Version 1.2.2 diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index f2322162..661f3b54 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -1204,6 +1204,8 @@ def _starts_block(token, state): class HamlLexer(ExtendedRegexLexer): """ For Haml markup. + + *New in Pygments 1.3.* """ name = 'Haml' @@ -1242,12 +1244,15 @@ class HamlLexer(ExtendedRegexLexer): (r'(/)(\[' + _dot + '*?\])(' + _dot + '*\n)', bygroups(Comment, Comment.Special, Comment), '#pop'), - (r'/' + _dot + '*\n', _starts_block(Comment, 'html-comment-block'), '#pop'), - (r'-#' + _dot + '*\n', _starts_block(Comment.Preproc, 'haml-comment-block'), '#pop'), + (r'/' + _dot + '*\n', _starts_block(Comment, 'html-comment-block'), + '#pop'), + (r'-#' + _dot + '*\n', _starts_block(Comment.Preproc, + 'haml-comment-block'), '#pop'), (r'(-)(' + _dot + '*\n)', bygroups(Punctuation, using(RubyLexer)), '#pop'), - (r':' + _dot + '*\n', _starts_block(Name.Decorator, 'filter-block'), '#pop'), + (r':' + _dot + '*\n', _starts_block(Name.Decorator, 'filter-block'), + '#pop'), include('eval-or-plain'), ], @@ -1306,6 +1311,8 @@ class HamlLexer(ExtendedRegexLexer): class SassLexer(ExtendedRegexLexer): """ For Sass stylesheets. + + *New in Pygments 1.3.* """ name = 'Sass' @@ -1321,8 +1328,10 @@ class SassLexer(ExtendedRegexLexer): ], 'content': [ - (r'//[^\n]*', _starts_block(Comment.Single, 'single-comment'), 'root'), - (r'/\*[^\n]*', _starts_block(Comment.Multiline, 'multi-comment'), 'root'), + (r'//[^\n]*', _starts_block(Comment.Single, 'single-comment'), + 'root'), + (r'/\*[^\n]*', _starts_block(Comment.Multiline, 'multi-comment'), + 'root'), (r'@import', Keyword, 'import'), (r'@for', Keyword, 'for'), (r'@(debug|if|while)', Keyword, 'script'), |