summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2009-02-14 13:27:41 +0100
committergbrandl <devnull@localhost>2009-02-14 13:27:41 +0100
commitececbbeaec4c3b87a9790bb60cc67809fedc5565 (patch)
tree8b40bbf71cdaba289c6dae2dc92a9432b07f68db
parent5ad29d59652da2ee8cb1e5d7674e5f3f1352ab96 (diff)
parent215dc40acfdb622e60e91989e3fb62d6846e6eba (diff)
downloadpygments-ececbbeaec4c3b87a9790bb60cc67809fedc5565.tar.gz
merge with tim
-rw-r--r--CHANGES22
-rw-r--r--pygments/lexer.py1
-rw-r--r--pygments/lexers/compiled.py17
3 files changed, 18 insertions, 22 deletions
diff --git a/CHANGES b/CHANGES
index e8a4c9c5..4df0aeaa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -18,27 +18,25 @@ Version 1.1
* MXML
* Cython
-- Added "anchorlinenos" option to HTML formatter.
+- Add "anchorlinenos" option to HTML formatter.
-- Fix a bug lexing extended Ruby strings.
-
-- Fix a bug when lexing git diffs.
-
-- Fix a bug in the JavaScript lexer (#383).
+- Support multiline strings in Lua lexer.
-- Fix a few problems in Matlab lexer (#378).
+- When pygmentize is asked to highlight a file for which multiple lexers
+ match the filename, use the analyse_text guessing engine to determine the
+ winner (#355).
-- Support multiline strings in Lua lexer.
+- Fix minor bugs in the JavaScript lexer (#383), the Matlab lexer (#378),
+ the Scala lexer (#392), the INI lexer (#391), the Clojure lexer (#387)
+ and the AS3 lexer (#389).
- Fix a Perl heredoc bug (#729).
- Fix a bug in the image formatter which misdetected lines (#380).
-- When pygmentize is asked to highlight a file for which multiple lexers
- match the filename, use the analyse_text guessing engine to determine the
- winner (#355).
+- Fix a bug lexing extended Ruby strings.
-- Fix minor bugs in Clojure lexer (#387), AS3 lexer (#389), INI lexer (#391)
+- Fix a bug when lexing git diffs.
Version 1.0
diff --git a/pygments/lexer.py b/pygments/lexer.py
index 0e6f06bb..053df0fd 100644
--- a/pygments/lexer.py
+++ b/pygments/lexer.py
@@ -477,7 +477,6 @@ class RegexLexer(Lexer):
for rexmatch, action, new_state in statetokens:
m = rexmatch(text, pos)
if m:
- # print rex.pattern
if type(action) is _TokenType:
yield pos, action, m.group()
else:
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index dbd1173b..f361de3a 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -992,23 +992,22 @@ class ScalaLexer(RegexLexer):
(ur'%s|%s|`[^`]+`' % (idrest, op), Name.Class, '#pop'),
],
'type': [
- (r'(?<=\])(\s*$)', Text, '#pop'),
- (r'[\s\n]+', Text),
- (ur'<[%:]|=>|>:|[#_\u21D2]|forSome|type', Keyword),
- (r'([,\);}]|=(?!>))([\s\n]*)', bygroups(Operator, Text), '#pop'),
+ (r'\s+', Text),
+ (ur'<[%:]|>:|[#_\u21D2]|forSome|type', Keyword),
+ (r'([,\);}]|=>|=)([\s\n]*)', bygroups(Operator, Text), '#pop'),
(r'[\(\{]', Operator, '#push'),
- (ur'((?:\.|%s|%s|`[^`]+`)+)([\s]*)(\[)' % (idrest, op),
- bygroups(Keyword.Type, Text, Operator), 'typeparam'),
- (ur'((?:\.|%s|%s|`[^`]+`)+)(\s*)$' % (idrest, op),
+ (ur'((?:%s|%s|`[^`]+`)(?:\.(?:%s|%s|`[^`]+`))*)(\s*)(\[)' % (idrest, op, idrest, op),
+ bygroups(Keyword.Type, Text, Operator), ('#pop', 'typeparam')),
+ (ur'((?:%s|%s|`[^`]+`)(?:\.(?:%s|%s|`[^`]+`))*)(\s*)$' % (idrest, op, idrest, op),
bygroups(Keyword.Type, Text), '#pop'),
- (ur'(\.|%s|%s|`[^`]+`)+' % (idrest, op), Keyword.Type)
+ (ur'\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type)
],
'typeparam': [
(r'[\s\n,]+', Text),
(ur'<[%:]|=>|>:|[#_\u21D2]|forSome|type', Keyword),
(r'([\]\)\}])', Operator, '#pop'),
(r'[\(\[\{]', Operator, '#push'),
- (ur'(\.|%s|%s|`[^`]+`)+' % (idrest, op), Keyword.Type)
+ (ur'\.|%s|%s|`[^`]+`' % (idrest, op), Keyword.Type)
],
'comment': [
(r'[^/\*]+', Comment.Multiline),