Page MenuHomePhabricator

Lua nested multi-line comments are not highlighted properly in CodeMirror
Closed, ResolvedPublicBUG REPORT

Description

The following should be highlighitng like a comment block in Lua:

--[=[
This is a comment block.
This is a comment block.
This is a comment block.
]=]

However only the opening line --[=[ is highlight as such. The parser does seem to recover well with any subsequent code, at least.

This is reproducible with the upstream CodeMirror Lua stream parser.

Event Timeline

I have submitted a pull request to the upstream @codemirror/legacy-modes library.

Bhsd changed the task status from Open to In Progress.Apr 24 2026, 11:07 PM
Bhsd claimed this task.
Bhsd added a subscriber: Trappist_the_monk.

Change #1287876 had a related patch set uploaded (by Bhsd; author: Bhsd):

[mediawiki/extensions/CodeMirror@master] package: Upgrade to @codemirror/legacy-modes@6.5.3

https://gerrit.wikimedia.org/r/1287876

Change #1287876 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] package: Upgrade to @codemirror/legacy-modes@6.5.3

https://gerrit.wikimedia.org/r/1287876

Bhsd moved this task from Bugs to Done on the MediaWiki-extensions-CodeMirror board.