Package: vim-runtime
Version: 2:7.4.273-2
Severity: minor
Tags: patch
Some valid \N{...} sequences in Python Unicode literals are not
correctly highlighted:
u'''
this sequence is highlighted correctly: \N{FULL STOP}
but this one is not: \N{HYPHEN-MINUS}
'''
This happens because the relevant regexp accepts only letters and
spaces; but Unicode characters names can contain also hyphens and
digits. Patch attached.
--
Jakub Wilk
--- unpacked/usr/share/vim/vim74/syntax/python.vim 2014-05-02 06:37:45.000000000 +0200
+++ /usr/share/vim/vim74/syntax/python.vim 2014-05-22 11:30:13.141883000 +0200
@@ -113,7 +113,7 @@
syn match pythonEscape "\\x\x\{2}" contained
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
-syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
+syn match pythonEscape "\\N{\%(\a\|\d\|-\)\+\%(\s\%(\a\|\d\|-\)\+\)*}" contained
syn match pythonEscape "\\$"
if exists("python_highlight_all")