[PATCH] Contrib: removed ngxBlock syntax group

Maxim Dounin mdounin at mdounin.ru
Thu Mar 3 17:48:39 UTC 2016


On Thu, Mar 03, 2016 at 11:21:51PM +0800, OOO wrote:

> More info about this patch.
> Before the patch
> https://www.flickr.com/photos/othree/24844596133/
> After the patch
> https://www.flickr.com/photos/othree/25471327825/
> The major difference is the `rewrite ` directives are correct now.
> Old syntax had wrong syntax on rewrite if following regexp have character
> `{`.
> Which have special function in regexp.

Another difference is the "js" string now incorrectly highlited 
now in the regexp location.  That's clearly a regression.

> The easiest way to solve this issue is to remove the `ngxBlock` definition.
> Cons of this patch:
> Old syntax have some debug feature. (incorrect directive follow by `{}`
> block will not highlight)
> New syntax don't have this feature.
> If want to have both correct syntax and debug feature.
> Will lead to more complete syntax definition.
> And will be slower.

I tend to think that explicit detection of blocks is a good 
feature, and it would be wrong to remove it.  Especially as it 
causes other problems.

Maxim Dounin

More information about the nginx-devel mailing list