Page MenuHomePhabricator

Visual Editor makes uncommanded whitespace changes when editing reference templates
Open, Needs TriagePublicBUG REPORT

Description

See https://en.wikipedia.org/w/index.php?title=Ancient_Cappadocian_language&diff=prev&oldid=1365978483

I went to https://en.wikipedia.org/w/index.php?title=Ancient_Cappadocian_language&oldid=1365836026, edited the page, then double-clicked on the "Works cited" section. The only changes I made were to insert some brackets around some publishers and journal names.

When I saved the edit, VE changed (added in some places, removed in others) a lot of whitespace in the citation templates. This just generates visual noise making the diff harder to understand, so VE should just leave the whitespace as it found it.

Event Timeline

At least a partial dupe of T179259, I think?

The dupe part is that this is the same "Parsoid reserializes templates to respect the wiki's templatedata for them" behavior. (Cite_book and Cite_journal are both format: "{{_ |_=_}}")

The non-dupe part would be that it is modifying the whitespace in the templates that're just adjacent to the ones you actually modified. You modified 5 of them, but 11 got normalized. Can you remember whether you opened those templates with no content changes and closed the dialog by choosing "apply changes"? That'd probably be enough for VE to have resaved the data and thus for selser to think it needs to rework them despite no real content difference.

It's been a few days, I'm afraid I don't remember any details beyond what I reported.