Page MenuHomePhabricator

Reply tool inserts colons inside template, sometimes breaking the template and causing Linter errors
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to a talk page with a discussion that has no existing indentation and one posting.
  • Click Reply, and type the following code:
Testing insertion of 
{{blockquote|
foo
bar
|source=Source
}}

What happens?:
This is inserted:

:Testing insertion of 
:{{blockquote|
:foo
:bar
:|source=Source
:}}

This insertion creates five separate Linter errors by putting colons in front of new lines inside the template.

Links to diffs
Found in the wild: https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:WikiProject_Articles_for_creation&diff=prev&oldid=1331802688

My test edit: https://en.wikipedia.org/w/index.php?title=User_talk%3AJonesey95&diff=1332215569&oldid=1332128884

What should have happened instead?:
Colons should not be inserted on new lines that are inside template code.

The reply should have inserted this:

:Testing insertion of 
:{{blockquote|
foo
bar
|source=Source
}}

For bonus points, do not insert colons in front of templates that are block content, since that causes two Linter errors.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):