Steps to reproduce
- Enable Wikitext syntax highlighting
- Open Wikipedia:Sandbox
- Edit it as source
- Type [https://example.com
Actual results
Expected results
The [ is not highlighted as if its a link as it gets rendered as plain text.
| Kaartic | |
| Jan 17 2018, 6:07 AM |
| F12607681: Screenshot from 2018-01-16 21-20-41.png | |
| Jan 17 2018, 6:07 AM |
| F12608078: Screenshot from 2018-01-17 11-35-50.png | |
| Jan 17 2018, 6:07 AM |
The [ is not highlighted as if its a link as it gets rendered as plain text.
CodeMirror has to make reasonable assumptions about the Wikitext which may be incomplete during editing (the so-called error tolerance). In this particular case, CodeMirror has to assume that [https://example.com is an incomplete external link instead of a plain [ plus a free external link, which makes total sense to most situations.