refactor: use stripOuterParagraph instead of str_replace

这个提交包含在:
alistair3149 2024-04-24 15:18:17 -04:00
父节点 b172b5fab3
当前提交 c553eddb41
找不到此签名对应的密钥
共有 1 个文件被更改,包括 1 次插入7 次删除

查看文件

@ -153,13 +153,7 @@ class Tabber {
// Legacy mode
if ( self::$parseTabName ) {
$tabName = $parser->recursiveTagParseFully( $tabName );
// Remove outer paragraph tags
if ( substr( $tabName, 0, 3 ) == '<p>' ) {
$tabName = substr( $tabName, 3 );
}
if ( substr( $tabName, -4 ) == '</p>' ) {
$tabName = substr( $tabName, 0, -4 );
}
$tabName = $parser->stripOuterParagraph( $tabName );
$tabName = htmlentities( $tabName );
} else {
$tabName = $parser->getTargetLanguageConverter()->convertHtml( $tabName );