Skip to content

Commit 8a0eb19

Browse files
authored
Fix Lua block syntax highlighting
Currently, opening a Lua block (e.g. with `content_by_lua_block`) causes the Lua syntax highlighter to bleed into the remainder of the file. Changing `match` from `true` to `3` seems to solve this problem, though I don't know enough about Sublime Text syntax definitions to understand why, or whether this is the correct way to fix the problem. Support for popping more than one context off the stack like this is described in the `pop` section here: https://www.sublimetext.com/docs/syntax.html#match_patterns Note: I'm using Sublime Text 4 (Build 4113), but I remember this problem being present in Sublime Text 3 as well. Also thanks for this package — it makes editing nginx files much easier.
1 parent 15a1db1 commit 8a0eb19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Syntaxes/nginx.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ contexts:
374374
push: Packages/Lua/Lua.sublime-syntax
375375
with_prototype:
376376
- match: '^\s*\}'
377-
pop: true
377+
pop: 3
378378
- match: '\b([a-zA-Z0-9\_]+)\s+'
379379
captures:
380380
1: keyword.directive.module.unsupported.nginx

0 commit comments

Comments
 (0)