mediawiki-extensions-Visual.../modules/ve-mw/dm
Máté Szabó d127dc48b7 ve.dm.MWTemplateModel: Don't add spurious empty parameters
Make ve.dm.MWTemplateModel#serialize ignore empty parameters if they were not
present in the transclusion before the edit. This avoids dirty diffs where an
user edits a template transclusion via VisualEditor, and the editor adds all
available template parameters to the edit wikitext, even if they were not
changed during the edit.

This logic was ported from the old Wikia-WMF VisualEditor project.[1]

Additionally, add tests for ve.dm.MWTemplateModel serialization.

---
[1] https://github.com/Wikia/app/pull/6450/commits/858eaa9

Bug: T101075
Change-Id: I35f8812724658904d30034db4e4684193a661c1e
2020-11-16 19:54:44 +01:00
..
annotations Move MWutils to preinit and rename to parsoid utils 2020-03-24 23:13:16 +01:00
metaitems MWCategoryMetaItem: Allow trailing whitespace (e.g. \n) in category names 2020-10-06 12:17:30 -07:00
models ve.dm.MWTemplateModel: Don't add spurious empty parameters 2020-11-16 19:54:44 +01:00
nodes Allow alien extension node encapsulation wrappers to be of various types 2020-10-20 11:44:54 -04:00
.eslintrc.json build: Update eslint-config-wikimedia to 0.16.0 2020-06-02 21:30:00 +01:00
ve.dm.MWWikitextSurface.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.MWWikitextSurfaceFragment.js Revert "Allow generic params to be passed to getWikitextFragment" 2020-06-19 13:15:23 +00:00