From 63082595d9f71ac7def0562b383c4c817bd31dab Mon Sep 17 00:00:00 2001 From: Moritz Schubotz Date: Wed, 11 Jan 2017 11:36:00 -0800 Subject: [PATCH] Change chemistry tag name from ce to chem will still work, but it's deprecated. Bug: T153606 Change-Id: Idef1078b188f2b945c9e1f8f66096779cc37133f --- Math.hooks.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Math.hooks.php b/Math.hooks.php index 8f0ff4a..2950b66 100644 --- a/Math.hooks.php +++ b/Math.hooks.php @@ -166,7 +166,9 @@ class MathHooks { */ static function onParserFirstCallInit( $parser ) { $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; } @@ -411,7 +413,7 @@ class MathHooks { * @param Parser $parser * @return array */ - static function ceTagHook( $content, $attributes, $parser ) { + static function chemTagHook( $content, $attributes, $parser ) { $attributes['chem'] = true; return MathHooks::mathTagHook( '\ce{' . $content . '}', $attributes, $parser ); }