Page MenuHomePhabricator

CodeMirror syntax highlighter does not understand multi-line tags
Closed, ResolvedPublic

Description

If open tag is written in one line, CodeMirror highlights it correctly and matches closing tag correctly:

изображение.png (57×183 px, 3 KB)

But in case of multi-line open tag (which can be found in sophisticated templates with argument-driven classes and CSS attributes in tags), CodeMirror does not recognize open tag and marks closing tag as unpair:
изображение.png (83×195 px, 3 KB)

Since such sophisticated templates need syntax highlighting the most, it's a bit annoying.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Niharika removed a project: Community-Tech.
Niharika subscribed.

Triaging this as low priority as it's somewhat rare to run into this unless you edit complicated templates very often.

Facenapalm renamed this task from CodeMirror syntax highlighter do not understand multi-line tags to CodeMirror syntax highlighter does not understand multi-line tags.Aug 10 2018, 7:50 PM

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

[mediawiki/extensions/CodeMirror@master] Highlight multi-line tags

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

Change 765358 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] Highlight multi-line tags

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