Fix paragraph split, thanks to @pewgeuges

This commit is contained in:
Laurent Zimmerli 2021-04-17 22:45:50 +02:00
parent e06535852b
commit 36e92bac3d

View file

@ -2094,6 +2094,8 @@ class MCI_Footnotes_Task {
// Determine tooltip content.
if ( MCI_Footnotes::$a_bool_tooltips_enabled ) {
$l_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text;
$l_arr_paragraph_splitters = array( '#(</p *>|<p[^>]*>)#', '#(</div *>|<div[^>]*>)#');
$l_str_tooltip_content = preg_replace( $l_arr_paragraph_splitters, '<br />', $l_str_tooltip_content );
} else {
$l_str_tooltip_content = '';
}