syntax: python: avoid coloring the three special values inside strings

Reported-by: Benjamin Mintz <bmintz@protonmail.com>
Suggested-by: Brand Huntsman <alpha@qzx.com>
master
Benno Schulenberg 2018-08-16 19:55:03 +02:00
parent 18419b5e3f
commit 850e538ff7
1 changed files with 3 additions and 3 deletions

View File

@ -14,6 +14,9 @@ color brightcyan "\<(def|del|elif|else|except|exec|finally|for|from)\>"
color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>" color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>"
color brightcyan "\<(pass|print|raise|return|try|while|with|yield)\>" color brightcyan "\<(pass|print|raise|return|try|while|with|yield)\>"
# Special values.
color brightmagenta "\<(False|None|True)\>"
# Single-quoted strings. # Single-quoted strings.
color brightgreen "'([^'\]|\\.)+'" color brightgreen "'([^'\]|\\.)+'"
color brightgreen ""([^"\]|\\.)+"" color brightgreen ""([^"\]|\\.)+""
@ -23,9 +26,6 @@ color brightred "(^|[[:blank:]])#.*$"
color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''" color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''"
color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(\])\"\"\"" color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(\])\"\"\""
# Special values.
color brightmagenta "\<(False|None|True)\>"
# Reminders. # Reminders.
color brightwhite,yellow "(FIXME|TODO|XXX)" color brightwhite,yellow "(FIXME|TODO|XXX)"