File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 44
55class Math
66{
7- private static function loadMathjax (\XF \BbCode \Renderer \AbstractRenderer $ renderer )
8- {
9- $ renderer ->getTemplater ()->includeJs ([
10- 'src ' => 'inforge/bbmath/mathjax-loader.js ' ,
11- 'addon ' => 'Inforge/BbMath ' ,
12- 'min ' => true ,
13- ]);
14- }
15-
167 public static function renderMathTag ($ tagChildren , $ tagOption , $ tag ,
178 array $ options , \XF \BbCode \Renderer \AbstractRenderer $ renderer )
189 {
1910 $ pre = '$$\[ ' ;
2011 $ post = '$$\] ' ;
21- if (strpos ($ tag ['tag ' ], 'imath ' ) === 0 ) {
12+ if (strpos ($ tag ['tag ' ], 'imath ' ) !== false ) {
2213 $ pre = '$$\( ' ;
2314 $ post = '$$\) ' ;
2415 }
2516 if (count ($ tagChildren ) == 0
2617 || !is_string ($ tagChildren [0 ])
2718 || strlen ($ tagChildren [0 ]) == 0 )
2819 return '' ;
29- self ::loadMathjax ($ renderer );
20+ $ renderer ->getTemplater ()->includeJs ([
21+ 'src ' => 'inforge/bbmath/mathjax-loader.js ' ,
22+ 'addon ' => 'Inforge/BbMath ' ,
23+ 'min ' => true ,
24+ ]);
3025 return $ pre . $ tagChildren [0 ] . $ post ;
3126 }
3227}
You can’t perform that action at this time.
0 commit comments