Page MenuHomePhabricator

Behavior switches are not highlighted inside a template
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Edit a sandbox page with CodeMirror 6 enabled.
  • Insert {{a|__toc__}}__toc__ into the editor.

What happens?:

The behavior switch __toc__ is only highlighted outside the template.

What should have happened instead?:

The behavior switch should also be highlighted inside a template.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Bhsd changed the task status from Open to In Progress.Apr 10 2026, 5:20 AM
Bhsd claimed this task.
Bhsd updated the task description. (Show Details)

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

[mediawiki/extensions/CodeMirror@master] CodeMirrorMediaWiki: highlight double underscores in a template

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

Change #1269838 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] CodeMirrorMediaWiki: highlight double underscores in a template

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

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