Merge pull request #118 from markcheret/fix_103
Fix paragraph separation
This commit is contained in:
commit
226df694a2
1 changed files with 10 additions and 0 deletions
|
@ -2094,6 +2094,16 @@ class MCI_Footnotes_Task {
|
||||||
// Determine tooltip content.
|
// Determine tooltip content.
|
||||||
if ( MCI_Footnotes::$a_bool_tooltips_enabled ) {
|
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_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text;
|
||||||
|
/**
|
||||||
|
* Ensures paragraph separation
|
||||||
|
*
|
||||||
|
* @reporter @pewgeuges
|
||||||
|
* @link https://github.com/markcheret/footnotes/issues/103
|
||||||
|
* @since 2.7.1
|
||||||
|
* Ensures that footnotes containing paragraph separators get displayed correctly.
|
||||||
|
*/
|
||||||
|
$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 {
|
} else {
|
||||||
$l_str_tooltip_content = '';
|
$l_str_tooltip_content = '';
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue