Add Hook to add attributes to span
这个提交包含在:
父节点
3158d844b5
当前提交
d38cd5057d
|
@ -33,6 +33,9 @@ class SimpleMathJaxHooks {
|
|||
private static function renderTex($tex, $parser) {
|
||||
$parser->getOutput()->addModules( 'ext.SimpleMathJax' );
|
||||
$parser->getOutput()->addModules( 'ext.SimpleMathJax.mobile' ); // For MobileFrontend
|
||||
return ["<span style='opacity:.5'>[math]${tex}[/math]</span>", 'markerType'=>'nowiki'];
|
||||
$attributes = [ "style" => "opacity:.5" ];
|
||||
Hooks::run( "SimpleMathJaxAttr", [ &$attributes, $tex ] );
|
||||
$element = Html::Element( "span", $attributes, "[math]{$tex}[/math]" );
|
||||
return [$element, 'markerType'=>'nowiki'];
|
||||
}
|
||||
}
|
||||
|
|
正在加载...
在新工单中引用