mediawiki-extensions-Visual.../modules/ve-mw
Thiemo Kreuz 22757fa901 Fix and test page name splitting code in template dialog
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
2021-09-11 17:40:39 +00:00
..
ce Use less repetitive code when calling .showHandles() 2021-09-03 09:16:22 +02:00
dm Fix term in valuable data test 2021-09-10 09:25:40 +00:00
init Remove redundant initialization from LinkCache 2021-09-02 13:54:15 +02:00
preinit Cleanups and optimizations related to .parseDom() 2021-09-02 18:29:09 +00:00
tests Fix and test page name splitting code in template dialog 2021-09-11 17:40:39 +00:00
themes
ui Fix and test page name splitting code in template dialog 2021-09-11 17:40:39 +00:00