From 6b7c661fb7385637286b44c37d8c1ae6bf45290f Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 25 Apr 2021 17:21:08 +0200 Subject: [PATCH] syntax: po: improve the coloring of format specifiers This now handles most of the things listed in 'man 3 printf'. --- syntax/po.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/po.nanorc b/syntax/po.nanorc index 42b703f7..66cee17a 100644 --- a/syntax/po.nanorc +++ b/syntax/po.nanorc @@ -22,7 +22,7 @@ color brightblue "^(msgid|msgid_plural|msgstr)\>" color red " fuzzy(,|$)" color yellow " (no-)?[-[:alpha:]]+-format(,|$)" # Format specifiers. -color brightmagenta "%([1-9]\$)?[a-z]*" +color brightmagenta "%([1-9]\$)?[#0 +'I-]?(\*([1-9]\$)?|[1-9](\.[0-9]?)?)?[hlLjzt]?[diouxXeEfFgGaAcspnm%]" # Quotes and escaped characters. color yellow """ color cyan "\\([abcefnrtv"\]|x[0-9abcdefABCDEF]{2}|[0-7]{3})"