summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunn <andrew@dunn.name>2014-03-14 13:31:58 +1100
committerAndrew Dunn <andrew@dunn.name>2014-03-14 13:31:58 +1100
commit820df2acd2bf0f4b7c507b69546224ea31f09675 (patch)
tree0a7a9aaa252f3090c87d2ba69f5711f327a5cfaa
parent87cf3e1a72b8b0c031afbff4f8effd9661bef8a3 (diff)
downloadpygments-820df2acd2bf0f4b7c507b69546224ea31f09675.tar.gz
Fixed VimL literal string lexer.
The only escape string in a vim literal string (single quotes) is `''` which is expanded to a single, single-quote. This was not the behaviour of the previous implementation and this caused incorrect syntax highlighting as a result.
-rw-r--r--pygments/lexers/text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 8de786c2..1bab62f3 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -842,7 +842,7 @@ class VimLexer(RegexLexer):
# TODO: regexes can have other delims
(r'/(\\\\|\\/|[^\n/])*/', String.Regex),
(r'"(\\\\|\\"|[^\n"])*"', String.Double),
- (r"'(\\\\|\\'|[^\n'])*'", String.Single),
+ (r"'(''|[^\n'])*'", String.Single),
# Who decided that doublequote was a good comment character??
(r'(?<=\s)"[^\-:.%#=*].*', Comment),