nano: fix syntax highlighting for raw ucode scripts
authorJo-Philipp Wich <jo@mein.io>
Thu, 4 Apr 2024 23:33:50 +0000 (01:33 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Fri, 5 Apr 2024 14:25:56 +0000 (17:25 +0300)
Text between interpreter line and start of first directive should only
highlighted as uninterpreted when running in template mode, so adjust
the match rule accordingly.

Fixes: #23761
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
utils/nano/Makefile
utils/nano/files/ucode.nanorc

index 4400b780f2d66434cb008f38a6178128f7f0c6e4..064a25e3d57eaa807507ba86ca31742f679878d7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
 PKG_VERSION:=7.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/nano
index 96c7848e21d0d7fd48a11dfd85a71c4e92c41e38..647f21d85f85fc9261eb99693406d6beb1099431 100644 (file)
@@ -43,7 +43,7 @@ color ,green "[[:space:]]+$"
 
 # Text outside template directives
 color slate start="[}%#]\}" end="\{[{%#]"
-color slate start="^#!" end="\{[{%#]"
+color slate start="^#!.*(\<utpl\>|[[:space:]]-[[:alnum:]]*T[[:alnum:]]*\>)" end="\{[{%#]"
 color slate "^([^{%#}]|\{[^{%#]|[%#}][^}])+\{[{%#]"
 
 # Template tags