Fix #35 and panel rendering

This commit is contained in:
lkucharczyk 2020-09-29 18:56:06 +02:00
parent 05e55672a6
commit 8d2d9d6594
3 changed files with 3 additions and 2 deletions

View file

@ -27,6 +27,7 @@ class PortableInfoboxParsingHelper {
if ( $templateText ) {
$parser = new \Parser();
$parser->setTitle( $title );
$parserOptions = new \ParserOptions();
$frame = $parser->getPreprocessor()->newFrame();

View file

@ -32,7 +32,7 @@ class PortableInfoboxTemplateEngine {
public function __construct() {
if ( !isset( self::$lightncandy ) ) {
self::$lightncandy = class_exists( '\LightnCandy\LightnCandy' ) ? \LightnCandy\LightnCandy::class : \LightnCandy::class;
self::$compileFlags = self::$lightncandy::FLAG_BESTPERFORMANCE | self::$lightncandy::FLAG_PARENT;
self::$compileFlags = self::$lightncandy::FLAG_BESTPERFORMANCE | self::$lightncandy::FLAG_PARENT | self::$lightncandy::FLAG_HANDLEBARS;
}
if ( !isset( self::$memcache ) ) {

View file

@ -215,7 +215,7 @@ class PortableInfoboxRenderService {
break;
}
}
if ( $collapse !== null && count( $tabContents ) > 0 && !empty( $header ) ) {
if ( $collapse !== null && count( $sections ) > 0 && !empty( $header ) ) {
$cssClasses[] = 'pi-collapse';
$cssClasses[] = 'pi-collapse-' . $collapse;
}