Page MenuHomePhabricator

CodeMirror highlighting first apostrophe when the page ends with unclosed template/tag/anything that merit a darker background
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce:

  • See testwiki:CodeMirror bug test's source code with 2017 wikitext editor.
  • Turn the syntaxhighlight feature (probably bracket matching too) on.
  • Put your text cursor to the end of the first line (one with i and apostrophes), then type a space. If that doesn't work, delete the space and try again.

What happens?:
The first (unmatched) apostrophe gets highlighted as if it was wrapped in the "templates" (they both end up unparsed by MediaWiki). Another note is that if an unmatched apostrophe stands right before an italicized string (surrounded by double apostrophes) it gets highlighted inconsistently: sometimes light blue, sometimes black.

What should have happened instead?:
Logically saying, it shouldn't be highlighted at all.