Page MenuHomePhabricator

Comments after template name broke template highlighting in CodeMirror
Closed, DuplicatePublic

Description

Steps to reproduce:

  1. Open the code with multi-line template transclusion and put cursor right after template name (e. g. {{Example).
  2. Add at least one newline (important!)
  3. Add a comment

The rest of the template will be highlighted as a plain code.

Example: ru:(619) Триберга

изображение.png (486×522 px, 15 KB)

If comment goes on the same line with template start, the problem does not occurs:
изображение.png (466×578 px, 18 KB)

Event Timeline

This problem also occurs on frwiki.

fr:Constitution bolivienne de 2009

{{Infobox Norme juridique
<!-- PRESENTATION -->
 | désignation courte = 
 | image              = 
 | upright            = 
 | légende            = 
 ...
}}

HTML comment breaks the CodeMirror syntax highlighting, as on the screenshot above.

(sorry for my bad English)