summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-06-18 12:19:00 +0200
committerGeorg Brandl <georg@python.org>2011-06-18 12:19:00 +0200
commit0bf6072b0e75fa4b6afab5d23477d7aa4aa1c77c (patch)
treed6caebdc7594e16e1661af00f70e9c2eb4534619 /pygments
parent37b7bbe5fce3e868ce243d188f7c9eb8a8e3d52a (diff)
downloadpygments-0bf6072b0e75fa4b6afab5d23477d7aa4aa1c77c.tar.gz
Port Fancy lexer changes from https://github.com/fancy-lang/fancy-pygments.
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/agile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index 06226f24..9bd353be 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -1999,7 +1999,7 @@ class FancyLexer(RegexLexer):
# Comments
(r'#(.*?)\n', Comment.Single),
# Symbols
- (r'\'[^\'\s]+', String.Symbol),
+ (r'\'([^\'\s\[\]\(\)\{\}]+|\[\])', String.Symbol),
# Multi-line DoubleQuotedString
(r'"""(\\\\|\\"|[^"])*"""', String),
# DoubleQuotedString
@@ -2022,6 +2022,7 @@ class FancyLexer(RegexLexer):
('[A-Z][a-zA-Z0-9_]*', Name.Constant),
('@[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable.Instance),
('@@[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable.Class),
+ ('(@|@@)', Operator),
('[a-zA-Z_][a-zA-Z0-9_]*', Name),
# numbers - / checks are necessary to avoid mismarking regexes,
# see comment in RubyLexer