Skip to content

Commit

Permalink
[Lua] Fix block comments after doc comments (#4141)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbartlett21 authored Feb 5, 2025
1 parent 3fb12d9 commit df76b02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lua/Lua.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ contexts:
set: maybe-line-doc-comment

maybe-line-doc-comment:
- match: ^\s*(?=--(?!\[\[))
- match: ^\s*(?=--(?!\[(=*)\[))
set:
- match: -{2,}
scope: punctuation.definition.comment.lua
Expand Down
8 changes: 8 additions & 0 deletions Lua/tests/syntax_test_lua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
-- no more doc comment after empty line
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - comment.line.documentation

--- Another doc comment
--[=[ block comments after should work with an equals
-- ^^^^^ comment.block punctuation.definition.comment.begin
commented
-- ^^^^^^^^^ comment.block
]=]
-- ^^^ comment.block punctuation.definition.comment.end

-----------------
--^^^^^^^^^^^^^^^ comment.line.documentation.lua punctuation.definition.comment.lua
-- This will also do.
Expand Down

0 comments on commit df76b02

Please sign in to comment.