Adding = as a parser function

Bug: T91154
Change-Id: I8c9df0a8ce07e1febef137946615efd74d4800e3
This commit is contained in:
Base 2020-06-11 22:05:11 +03:00 committed by C. Scott Ananian
parent 19baae47ff
commit 4bc0dc348a
5 changed files with 8 additions and 6 deletions

View file

@ -191,6 +191,10 @@ For notes on 1.34.x and older releases, see HISTORY.
$wgInterwikiMagic=false
* The form at ?action=watch has a new dropdown list to support expiry dates for
watchlist items (if $wgWatchlistExpiry is true).
* `{{=}}` is now a wikitext built-in template, expanding to `=`. This
is conventially used as an escape mechanism to allow the use of `=` in
unnamed template arguments, although there are workarounds using named
arguments.
* …
=== New developer features in 1.35 ===

View file

@ -43,6 +43,7 @@ class MagicWordFactory {
/** @var string[] */
private $mVariableIDs = [
'!',
'=',
'currentmonth',
'currentmonth1',
'currentmonthname',

View file

@ -61,6 +61,8 @@ class CoreMagicVariables {
switch ( $id ) {
case '!':
return '|';
case '=':
return '=';
case 'currentmonth':
return $pageLang->formatNum( MWTimestamp::getInstance( $ts )->format( 'm' ), true );
case 'currentmonth1':

View file

@ -221,6 +221,7 @@ $magicWords = [
'toc' => [ 0, '__TOC__' ],
'noeditsection' => [ 0, '__NOEDITSECTION__' ],
'!' => [ 1, '!' ],
'=' => [ 1, '=' ],
'currentmonth' => [ 1, 'CURRENTMONTH', 'CURRENTMONTH2' ],
'currentmonth1' => [ 1, 'CURRENTMONTH1' ],
'currentmonthname' => [ 1, 'CURRENTMONTHNAME' ],

View file

@ -86,12 +86,6 @@ Template:pipe
|
!! endarticle
!! article
Template:=
!! text
<nowiki>=</nowiki>
!! endarticle
!!article
MediaWiki:bad image list
!!text