Improve mediaWiki.parser() (which is a very strange name for a function that expands...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 8 Oct 2010 10:49:32 +0000 (10:49 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 8 Oct 2010 10:49:32 +0000 (10:49 +0000)
commitd670151e1734ed6118141753925b1964a65ac795
treedb92da960623644ce89720603190a181dbd27347
parentebb291ce8a94f8e8de5e85fef9dfdb98b2105473
Improve mediaWiki.parser() (which is a very strange name for a function that expands $1, $2, ... in i18n messages) to use .replace() with a callback, so it will handle edge cases like more than 9 parameters ($10 would be treated as $1 followed by a literal 0) or a parameter's value containing $n (which would then get substituted again). Code written by Neil Kandalgaonkar and trivially modified by me.
resources/mediawiki/mediawiki.js