Go to file
Brad Jorsch 18c08c23fc ustring: Match undocumented string.gsub behavior
As documented, string.gub( 'foo', '%a', '%1' ) should raise an invalid
capture index error because there is no capture with index 1 in the
pattern. But in fact it treats %1 as %0 in this situation. The ustring
library should match this behavior.

This patch also adds some tests for the behavior of gsub with table and
function replacements when the pattern does have captures.

Bug: T207623
Change-Id: Ie3e6c2eafa4a05989815c62c7037167642581751
2018-11-01 03:59:35 +00:00
i18n Localisation updates from https://translatewiki.net. 2018-10-28 22:22:03 +01:00
includes ustring: Match undocumented string.gsub behavior 2018-11-01 03:59:35 +00:00
modules build: Update linters 2018-02-04 22:10:26 +00:00
tests ustring: Match undocumented string.gsub behavior 2018-11-01 03:59:35 +00:00
.eslintrc.json build: Replace jscs/jshint with eslint 2017-05-12 16:24:59 +00:00
.gitignore Add phan configuration 2018-05-14 18:41:59 -07:00
.gitreview Whoops, track not trace 2016-10-24 17:03:31 -07:00
.minus-x.json Move classes into includes/ 2018-04-09 08:54:22 -07:00
.phpcs.xml Add @covers tags to all tests 2018-05-29 11:37:27 -07:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 10:27:54 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-03 21:33:35 +00:00
composer.json build: Updating mediawiki/phan-taint-check-plugin to 1.5.0 2018-09-08 05:35:16 +00:00
COPYING Specify license and add COPYING file 2016-09-16 01:38:15 +00:00
extension.json Update extensions to take advantage of parser test autodiscovery 2018-04-13 15:07:17 +00:00
Gruntfile.js Use json extension for .stylelintrc 2017-08-19 10:27:54 +02:00
package.json build: Updating npm dependencies for security issues 2018-10-11 10:43:59 +00:00
Scribunto.magic.php Use short array syntax 2017-06-16 13:26:30 +00:00
Scribunto.namespaces.php Localize namespaces to Shan 2018-10-15 08:56:11 +00:00
Scribunto.php Start showing warning for deprecated PHP entry point 2018-10-30 16:39:24 +00:00