[PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock
Maxim Dounin
mdounin at mdounin.ru
Fri Mar 3 14:05:34 UTC 2017
Hello!
On Fri, Mar 03, 2017 at 06:56:59PM +0800, othree wrote:
> # HG changeset patch
> # User othree <othree at gmail.com>
> # Date 1488538568 -28800
> # Fri Mar 03 18:56:08 2017 +0800
> # Node ID 433844daf574dbf89390e574201b3db417337cdd
> # Parent b88ed85b7b4f3ea5a586f4f58251481348c502f1
> Contrib: vim syntax, remove unecessary ngxBlock.
>
> ngxBlock breaks highlighting for the following conf:
>
> rewrite "^/[0-9a-z]{40}/(.*)" /$1/ last;
While current implementation of ngxBlock looks incorrect, I don't
see how it breaks highlighting of the rewrite in question. Could
you please elaborate?
On the other hand, the rewrite highlighting is clearly incorrect
either. Rewrite arguments (much like any other directive
arguments) can be escaped strings, and the rewrite parsing as
implemented in the patch 2 doesn't take it into account, hence it
will be broken with a configuration like:
rewrite "/foo bar/" /bazz/ last;
In general, it might be better idea to start with general
configuration syntax matching instead of focusing on the ad-hoc
solutions for some particular directives. And removing ngxBlock
looks like a step in the wrong direction to me, as it is a basic
concept of the configuration syntax.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list