Use the test instance to check the scope and difficulty of installing the code mirror addons for bracket and tag matching, without any alteration. What would this look like in the two editors? Does it cause any unforeseen problems?
See the initial investigation for more detail: T254976: Investigation: Bracket matching .
Status
We can already outline some of the potential work for these features:
Bracket matching
- Easy, done: Load addon scripts.
- Easy, have a POC: Change highlighting styles to fit our existing color scheme. Matched and unmatched brackets should have normal text color. Matched bracket character should have background color Base70 #c8ccd1, unmatched brackets should have a red background. Needs some cleanup, an upstream style is commented out when it should be overridden.
- Easy: port our customizations to CodeMirror 6.x
- Medium: Fix bracket-matching logic to consistently detect all types of brackets, in each configuration. Currently (, {, [ each highlight but not in every situation and it's not yet clear what is causing this. Possibly add < as well. Must include tests.
- Medium: VisualEditor "new wikitext" integration breaks the cursorActivity event.
- Medium, optional: Fix bracket-matching to detect and highlight "{{" and "[[" as pairs.
Tag matching
- Easy, done: Recognize all MediaWiki parser tags and give the same highlighting as basic HTML tags.
- Medium: Rely on above cursorActivity fix to integrate with VisualEditor.


