mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
04516bb02e
The first run of getDomFromData() would preserve whitespace just fine, but it blanked out the .veInternal.whitespace[1] element in certain cases, contaminating the linear model and making the whitespace data inconsistent. Subsequent runs of getDomFromData() would then refuse to serialize that whitespace because the information about it was inconsistent. In getDomFromData(), we sometimes unset .veInternal.whitespace[1] (i.e. set it to undefined) to prevent double processing. Because we're potentially going to modify .veInternal, don't assign it by reference, but copy the object. Added tests asserting that the linear model is unchanged after calling getDomFromData(), because that function should never modify linear model data. This test failed in 4 cases (all whitespace-related) before I added the copyObject() call. Bug: 43543 Change-Id: Ic4c93510518163894201a693ab50331413715967 |
||
---|---|---|
.. | ||
jquery | ||
qunit | ||
rangy | ||
unicodejs | ||
ve |