List of steps to reproduce (step by step, including full links if applicable):
- Visit https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=1089616201&action=edit, and make sure it is in source editor mode and CodeMirror syntax highlighting is enabled.
- Look at how the section headers and the next lines are incorrectly highlighted.
What happens?:
When section headers contain standalone special characters <, [, { and ~, the ending = will not be highlighted. By contrast, the ending characters in the next line will be mistakenly highlighted instead.
What should have happened instead?:
The ending = should be highlighted as a valid wikitext syntax, and the next line should not be involved.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
This bug is not browser-dependent.