FIX updating build_footnotes_index_from_content with new attribute data-footnote-content instaed of simply footnote-content
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2b903d7a1c
commit
ab817e16e1
|
|
@ -203,8 +203,8 @@ function build_footnotes_index_from_content($content)
|
||||||
}
|
}
|
||||||
|
|
||||||
$footnotes = [];
|
$footnotes = [];
|
||||||
// Trouve les balises <a> avec classe footnote-reference ET attribut footnote-content (ordre flexible)
|
// Trouve les balises <a> avec classe footnote-reference ET attribut data-footnote-content (ordre flexible)
|
||||||
$pattern = '/<a[^>]*class="[^"]*footnote-reference[^"]*"[^>]*footnote-content="([^"]*)"[^>]*>|<a[^>]*footnote-content="([^"]*)"[^>]*class="[^"]*footnote-reference[^"]*"[^>]*>/i';
|
$pattern = '/<a[^>]*class="[^"]*footnote-reference[^"]*"[^>]*data-footnote-content="([^"]*)"[^>]*>|<a[^>]*data-footnote-content="([^"]*)"[^>]*class="[^"]*footnote-reference[^"]*"[^>]*>/i';
|
||||||
$has_footnotes = preg_match_all($pattern, $content, $matches, PREG_SET_ORDER);
|
$has_footnotes = preg_match_all($pattern, $content, $matches, PREG_SET_ORDER);
|
||||||
|
|
||||||
if ($has_footnotes) {
|
if ($has_footnotes) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user