fix: add new lines to parsed tab content to ensure content are parsed as expected

Fixes: #151
This commit is contained in:
alistair3149 2024-06-23 16:30:52 -04:00
parent ee54cc1bb3
commit f4f8b4bfce
No known key found for this signature in database

View file

@ -113,7 +113,8 @@ class Tabber {
[ $tabName, $tabBody ] = array_pad( explode( '=', $tab, 2 ), 2, '' );
$tabName = trim( $tabName );
$tabBody = trim( $tabBody );
// Fix #151
$tabBody = '\n' . trim( $tabBody );
// Codex mode
if ( self::$useCodex ) {
@ -154,7 +155,8 @@ class Tabber {
$tabBody = '<p>' . $tabBody . '</p>';
}
// \n is needed for #151
return '<article class="tabber__panel" data-mw-tabber-title="' . $tabName .
'">' . $tabBody . '</article>';
'">' . $tabBody . '</article>\n';
}
}