diff options
author | Andrew Dunn <andrew@dunn.name> | 2014-03-14 13:31:58 +1100 |
---|---|---|
committer | Andrew Dunn <andrew@dunn.name> | 2014-03-14 13:31:58 +1100 |
commit | 820df2acd2bf0f4b7c507b69546224ea31f09675 (patch) | |
tree | 0a7a9aaa252f3090c87d2ba69f5711f327a5cfaa | |
parent | 87cf3e1a72b8b0c031afbff4f8effd9661bef8a3 (diff) | |
download | pygments-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.py | 2 |
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), |