We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4c30e4 commit 7d4bb23Copy full SHA for 7d4bb23
src/MermaidParserFunction.php
@@ -3,7 +3,6 @@
3
namespace Mermaid;
4
5
use Parser;
6
-use Html;
7
use MediaWiki\MediaWikiServices;
8
9
/**
@@ -81,7 +80,13 @@ public function parse( array $params ) {
81
80
$content = implode( "|", $mwParams );
82
$graphConfig = array_merge( $graphConfig, $mermaidConfig );
83
84
- return Html::rawElement(
+ if ( class_exists( 'MediaWiki\\Html\\Html' ) ) {
+ // MW 1.40+
85
+ $htmlClass = \MediaWiki\Html\Html::class;
86
+ } else {
87
+ $htmlClass = \Html::class;
88
+ }
89
+ return $htmlClass::rawElement(
90
'div',
91
[
92
'class' => $class,
@@ -92,7 +97,7 @@ public function parse( array $params ) {
97
]
93
98
)
94
99
],
95
- Html::rawElement(
100
+ $htmlClass::rawElement(
96
101
102
103
'class' => 'mermaid-dots',
0 commit comments