Fix Lua mode block comment token #25

Merged
marijn merged 1 commit from bhsd-harry/legacy-modes:main into main 2026-04-24 09:16:43 +02:00
Contributor

Per Lua spec, a long comment (i.e., block comment) starts with -- plus an opening long bracket, and an opening long bracket can have a non-zero level just like strings.

The original issue is from Wikimedia: https://phabricator.wikimedia.org/T424308 . The change has been tested against hundreds of Lua pages on multiple language editions of Wikipedia.

Per [Lua spec](https://www.lua.org/manual/5.5/manual.html#3.1), a long comment (i.e., block comment) starts with `--` plus an opening long bracket, and an opening long bracket can have a non-zero level just like strings. The original issue is from Wikimedia: https://phabricator.wikimedia.org/T424308 . The change has been tested against hundreds of Lua pages on multiple language editions of Wikipedia.
Per [Lua spec](https://www.lua.org/manual/5.5/manual.html#3.1), a long comment (i.e., block comment) starts with `--` plus an opening long bracket, and an opening long bracket can have a non-zero level just like strings.
marijn merged commit 3f5b430aa7 into main 2026-04-24 09:16:43 +02:00
Owner

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/legacy-modes!25
No description provided.