Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock

Maxim Dounin
March 03, 2017 09:06AM
Hello!

On Fri, Mar 03, 2017 at 06:56:59PM +0800, othree wrote:

> # HG changeset patch
> # User othree <othree@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/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 4] Contrib: vim syntax, allow multiline config by skipempty

othree 702 March 03, 2017 05:58AM

[PATCH 3 of 4] Contrib: vim syntax, highlight HTTP status code

othree 345 March 03, 2017 05:58AM

[PATCH 2 of 4] Contrib: vim syntax, highlight rewrite flag

othree 321 March 03, 2017 05:58AM

[PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock

othree 293 March 03, 2017 05:58AM

Re: [PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock

Maxim Dounin 286 March 03, 2017 09:06AM

Re: [PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock

OOO 338 March 03, 2017 10:40AM

Re: [PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock

Maxim Dounin 337 March 03, 2017 12:26PM

[PATCH] Contrib: vim syntax, support block region

othree 345 March 04, 2017 07:00AM

Re: [PATCH] Contrib: vim syntax, support block region

OOO 342 March 10, 2017 11:46AM

Re: [PATCH] Contrib: vim syntax, support block region

Maxim Dounin 320 March 10, 2017 11:54AM

Re: [PATCH] Contrib: vim syntax, support block region

OOO 293 March 10, 2017 11:58AM

Re: [PATCH] Contrib: vim syntax, support block region

OOO 287 April 19, 2017 05:54AM

Re: [PATCH] Contrib: vim syntax, support block region

Maxim Dounin 252 April 19, 2017 11:12AM

Re: [PATCH] Contrib: vim syntax, support block region

OOO 259 April 21, 2017 04:40AM

Re: [PATCH] Contrib: vim syntax, support block region

Maxim Dounin 328 April 21, 2017 09:48AM

Re: [PATCH 4 of 4] Contrib: vim syntax, remove unecessary ngxBlock

OOO 353 March 04, 2017 07:20AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 98
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready