Extract file name from thumbnail only from first occurrence
authorGilles Dubuc <gdubuc@wikimedia.org>
Thu, 12 Nov 2015 15:36:03 +0000 (16:36 +0100)
committerGilles Dubuc <gdubuc@wikimedia.org>
Thu, 12 Nov 2015 19:09:09 +0000 (20:09 +0100)
commit493d4c843c0448d707589e37bbcc84ced7c8fd55
tree90dcbc2f6842e1ef68a61870d03d4e6481dd0dd9
parente1ebc2de02efbaf9183a48359b0025b04de9c5e4
Extract file name from thumbnail only from first occurrence

The existing regex assumes repetition of the filename in both
areas of the URL, which is limiting. The use case is having the second
instance of the filename replaced by the sha1 of the original, as
done here: I545586ff8d0020d00d9faa1dff2d0d9721134452

Bug: T118437
Change-Id: I2c90e672e343fbb4d287f0f2a0397761824e25c7
resources/src/mediawiki/mediawiki.Title.js
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js