Change chemistry tag name from ce to chem
<ce> will still work, but it's deprecated. Bug: T153606 Change-Id: Idef1078b188f2b945c9e1f8f66096779cc37133f
This commit is contained in:
parent
f5778bafd2
commit
63082595d9
@ -166,7 +166,9 @@ class MathHooks {
|
|||||||
*/
|
*/
|
||||||
static function onParserFirstCallInit( $parser ) {
|
static function onParserFirstCallInit( $parser ) {
|
||||||
$parser->setHook( 'math', [ 'MathHooks', 'mathTagHook' ] );
|
$parser->setHook( 'math', [ 'MathHooks', 'mathTagHook' ] );
|
||||||
$parser->setHook( 'ce', [ 'MathHooks', 'ceTagHook' ] );
|
// @deprecated the ce tag is deprecated in favour of chem cf. T153606
|
||||||
|
$parser->setHook( 'ce', [ 'MathHooks', 'chemTagHook' ] );
|
||||||
|
$parser->setHook( 'chem', [ 'MathHooks', 'chemTagHook' ] );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -411,7 +413,7 @@ class MathHooks {
|
|||||||
* @param Parser $parser
|
* @param Parser $parser
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
static function ceTagHook( $content, $attributes, $parser ) {
|
static function chemTagHook( $content, $attributes, $parser ) {
|
||||||
$attributes['chem'] = true;
|
$attributes['chem'] = true;
|
||||||
return MathHooks::mathTagHook( '\ce{' . $content . '}', $attributes, $parser );
|
return MathHooks::mathTagHook( '\ce{' . $content . '}', $attributes, $parser );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user