Page MenuHomePhabricator

Lua syntax highlighting doesn't recognize comments properly
Closed, ResolvedPublic

Description

In https://fr.wiktionary.org/wiki/Module:FranceTerme, all the text after the first opening long bracket "[[" is grey, indicating it's a comment, up to the second closing long bracket, instead of the first. However, the module works fine and with CodeEditor, while editing the page, syntax highlighting is fine. Any idea to fix this?


Version: unspecified
Severity: normal
See Also:
https://github.com/GeSHi/geshi-1.0/issues/32

Details

Reference
bz73281

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:49 AM
bzimport set Reference to bz73281.
bzimport added a subscriber: Unknown Object (MLST).

Any reason..

--[=[
Start of hidden comments

. . .

End of hidden comments
]=]

... provides the desired detection of the closing of hidden comments long brackets? Could there have been a change in syntax usage since last release was updated or something?

Note: Also confirmed in https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Module_syntax_highlighting_broken_for_hidden_comments

.

(In reply to George Orwell III from comment #2)

Any reason..

--[=[
Start of hidden comments

. . .

End of hidden comments
]=]

... provides the desired detection of the closing of hidden comments long
brackets? Could there have been a change in syntax usage since last release
was updated or something?

If you have two such blocks in a single module, it shows the same issue. Basically, instead of finding the *first* close-comment after the open-comment, it finds the *last* one.

gerritadmin wrote:

Change 173104 had a related patch set uploaded by TheDJ:
Fix Lua comment blocks and string blocks.

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

gerritadmin wrote:

Change 173104 merged by jenkins-bot:
Fix Lua comment blocks and string blocks.

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

This should be deployed to WMF wikis with 1.25wmf9, see https://www.mediawiki.org/wiki/MediaWiki_1.25/Roadmap for the schedule.

Verified - working again!

.... after a cache refresh or two on the test-bed that is.

see: https://test2.wikipedia.org/s/p8u