From 93111361581049770716fdfbfc595e18c24bc6b4 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 6 Jun 2020 20:11:29 +0300 Subject: [PATCH] Ticket #4054: broken syntax highlighting for shell scripts. Revert "Ticket #3981: sh.syntax: allow for indented 'function' highlighting." This reverts commit 91d6d55bafbccdc13bf1d27cfb3a8ce42293622f. The syntax highlighting of shell scripts in mcedit misbehaves around matches of "function blabla()" inside literal quotes. It applies syntax highlighting as if it was function definition in normal conditions (out of literal quotes), breaking the colouring of whatever follows. Signed-off-by: Andrew Borodin --- misc/syntax/sh.syntax | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/syntax/sh.syntax b/misc/syntax/sh.syntax index c69d8161c..e89142d66 100644 --- a/misc/syntax/sh.syntax +++ b/misc/syntax/sh.syntax @@ -40,8 +40,8 @@ context default keyword $ brightgreen - keyword wholeleft linestart \[\s\]*function*() brightmagenta - keyword wholeleft linestart \[\s\]*function\[\s\]+ brightmagenta + keyword wholeleft linestart function*() brightmagenta + keyword wholeleft linestart function\[\s\]+ brightmagenta keyword wholeright +() brightmagenta wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._ -- 2.11.4.GIT