Page MenuHomePhabricator

VisualEditor removes white spaces in template, against wikitext conventions on some wikis
Closed, DuplicatePublic

Description

This problem was reported on German Wikipedia:

When using the Visual Editor to update the access date of a reference that has been formatted with the template Vorlage:Internetquelle, Visual Editor seems to autonomously remove the white spaces before and after the pipe symbols (“|”):

The problem ist that the TemplateData for Vorlage:Internetquelle specifies the format with white spaces: {{_ |_=_}}, see https://de.wikipedia.org/wiki/Vorlage:Internetquelle#TemplateData.2FCitoid

This was originally mentioned on:

Thank you!

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 6 2017, 2:01 PM
Deskana added a subscriber: Deskana.Jul 6 2017, 2:44 PM

@JStrodt_WMDE Does this problem change the output of the template, or is it a case of not following a wikitext convention?

@Deskana It's a case of not following a wikitext convention. The problem that arises out of this is that it makes the wikitext clunky and it confuses users of the wikitext editor, who then start correcting the wikitext to set it right.

Schnark added a subscriber: Schnark.Jul 7 2017, 7:29 AM

As far as I understand (and already wrote in the discussion on German Wikipedia) this is a duplicate of T138492: Add support for actual format strings to TemplateData's "format" parameter. While TemplateData has a custom format, Parsoid currently only understands inline and block, and uses inline for all unknown formats. So instead of the specified format {{_ |_=_}} the default {{_|_=_}} is used and the spaces are removed.

Deskana renamed this task from VisualEditor removes necessary white spaces in template to VisualEditor removes white spaces in template, against wikitext conventions on some wikis.Jul 7 2017, 10:39 AM