Page MenuHomePhabricator

VisualEditor should not delete spaces in template formatting
Closed, InvalidPublicBUG REPORT

Description

Some templates, mainly infoboxes are written with extra space at the beginning.

{{Template
  | parameter1 = foo
  | parameter2 = bar
}}

But when is page with such template edited with VisualEditor, the leading spaces disappear
https://cs.wikipedia.org/w/index.php?title=Kaple_svaté_Barbory_(Zálužice)&diff=prev&oldid=21315078&diffmode=source

{{Template
| parameter1 = foo
| parameter2 = bar
}}

In ideal case should VE add these spaces to all block templates (or to templates with specific row in TemplateData).
At least VE should not remove these spaces.

Event Timeline

How is this related to Pywikibot?

Izno subscribed.

You need to configure your TemplateData using the format parameter for the template of interest.

You need to configure your TemplateData using the format parameter for the template of interest.

@Izno Thanks, I did not know there is possibility to use own formatting.
I found I can use format : "{{_\n |_ = _\n}}".
But this is for one template. Is any way how to use this format as default for all block templates?

Not that I am aware of. That's the cost of using a more or less custom formatting.