Ticket #3981: sh.syntax: allow for indented 'function' highlighting.

This will allow for the following:

  if want_foo; then
      function foobar() {
          echo "foo"
      }
  else
      function foobar() {
          echo "bar"
      }
  fi
  foobar

Signed-off-by: TerraTech <1118433+TerraTech@users.noreply.github.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
TerraTech 2019-04-24 21:58:31 -04:00 committed by Andrew Borodin
parent 8196833781
commit 91d6d55baf

View File

@ -40,8 +40,8 @@ context default
keyword $ brightgreen
keyword wholeleft linestart function*() brightmagenta
keyword wholeleft linestart function\[\s\]+ brightmagenta
keyword wholeleft linestart \[\s\]*function*() brightmagenta
keyword wholeleft linestart \[\s\]*function\[\s\]+ brightmagenta
keyword wholeright +() brightmagenta
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._