mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
22757fa901
In JavaScript .split() behaves different, compared to PHP. In PHP the last element contains the rest of the string. In JavaScript the rest of the string is discarded. The limit acts as if the array is truncated. That's why we can reduce the number in 'foo/bar'.split( '/', 1 )[ 0 ] to 1, as we are only interested in the element "foo". The same code in the other class is currently not covered by a test. But changing it accordingly should be obviously fine now. Change-Id: I20c27d480ddb1799df9eb1e5bc119b724e80653d |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
preinit | ||
tests | ||
themes | ||
ui |