Merge branch 'main' into review-codebase

This commit is contained in:
Ben Goldsworthy 2021-04-19 12:27:24 +01:00 committed by GitHub
commit 57d5e40532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 10433 additions and 12042 deletions

View file

@ -2094,6 +2094,16 @@ class Footnotes_Task {
// Determine tooltip content.
if ( Footnotes::$a_bool_tooltips_enabled ) {
$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 {
$l_str_tooltip_content = '';
}