**Background**
This feature is part of the WMDE TechWish project "Making working with templates easier". It is specifically about improving template syntax and the ability to create and maintain templates. It will be implemented as a part of the syntax highlighter of the CodeMirror extension.
**Requirements**
[] Enable standard bracket matching CodeMirror add-on
[] Highlight a single bracket and its match/pair, including [ { ( type brackets, when cursor is next to a bracket (standard behavior)
[] Add section highlighting, where a cursor at an arbitrary position highlights the two most innermost brackets, see mock below.
[] All of the above requirements must be fully functional in both 2010 and 2017 (VE) wikitext editors, looking and behaving the same way
|Bracket matching|Section highlighting|
|{F33910572}|{F33910570}|
**Scope**
Excludes:
- Highlighting groups of linked brackets in either pairs or triples, for example {{{ }}} or [[ ]]
- Tag matching
- Unmatched bracket error highlighting
**Implementation plan**
[] Implement behind feature flag
[] Enable in syntax highlighter by default
[] Release on small number of wikis first, validate, then roll out to all wikis
Small default wikis:
- dewiki
- ... TBD
Release schedule is still TBD (likely Jan/Feb 2021).
**Communication**
[[ https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/Bracket_Matching | Project page ]] on meta
Notes:
* Exiting addon we want to use: https://github.com/codemirror/CodeMirror/blob/master/addon/edit/matchbrackets.js
* Note it's already ported to version 6 (a.k.a. "next"): https://github.com/codemirror/codemirror.next/blob/master/matchbrackets/src/matchbrackets.ts