commit 884d410d9d2f65cc67385756183f355880437e67
parent 1c1cbae6bcec3f311c4a50222b445bf13b118b46
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 22 Jul 2017 20:51:17 +0200
syntax: python: don't require a character after an opening triple quote
The succeeding character was needed to avoid miscolorings due to nano
getting confused about starts and ends. But since commit 7ef5c532,
nano should be getting the starts and ends always right, so... undo
"temporary" commit 7b2ea405 from two years ago.
This addresses https://savannah.gnu.org/bugs/?51526.
Reported-by: <exodus6395@googlemail.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/syntax/python.nanorc b/syntax/python.nanorc
@@ -17,8 +17,8 @@ color brightgreen ""([^"\]|\\.)+""
# Comments.
color brightred "(^|[[:blank:]])#.*$"
# Triple-quoted strings.
-color brightgreen start="'''[^'),]" end="(^|[^(\])'''"
-color brightgreen start="\"\"\"[^"),]" end="(^|[^(\])\"\"\""
+color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''"
+color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(\])\"\"\""
# Reminders.
color ,yellow "(FIXME|TODO|XXX)"