mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +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 |
||
---|---|---|
.. | ||
actions | ||
ce | ||
dm | ||
init | ||
example.png | ||
index.php | ||
ve.BranchNode.test.js | ||
ve.Document.test.js | ||
ve.example.js | ||
ve.Factory.test.js | ||
ve.LeafNode.test.js | ||
ve.Node.test.js | ||
ve.qunit.js | ||
ve.Range.test.js | ||
ve.test.js | ||
ve.Trigger.test.js |