mediawiki-extensions-Scribunto/includes/engines/LuaCommon
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
..
lualib ustring: Match undocumented string.gsub behavior 2018-11-01 03:59:35 +00:00
HashLibrary.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
HtmlLibrary.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
LanguageLibrary.php build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-03 21:33:35 +00:00
LibraryBase.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
LuaCommon.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
LuaInterpreter.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
MessageLibrary.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
SiteLibrary.php Don't use deprecated Interwiki static method 2018-06-07 11:40:08 -07:00
TextLibrary.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
TitleLibrary.php Get rid of call_user_func_array() 2018-07-03 19:40:19 -07:00
UriLibrary.php Disable Squiz.Classes.ValidClassName.NotCamelCaps globally 2018-05-24 22:26:11 -07:00
UstringLibrary.php ustring: Match undocumented string.gsub behavior 2018-11-01 03:59:35 +00:00