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

This commit is contained in:
Nonimart 2025-09-30 11:53:27 +02:00
parent 2b903d7a1c
commit ab817e16e1

View File

@ -203,8 +203,8 @@ function build_footnotes_index_from_content($content)
}
$footnotes = [];
// Trouve les balises <a> avec classe footnote-reference ET attribut footnote-content (ordre flexible)
$pattern = '/<a[^>]*class="[^"]*footnote-reference[^"]*"[^>]*footnote-content="([^"]*)"[^>]*>|<a[^>]*footnote-content="([^"]*)"[^>]*class="[^"]*footnote-reference[^"]*"[^>]*>/i';
// Trouve les balises <a> avec classe footnote-reference ET attribut data-footnote-content (ordre flexible)
$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);
if ($has_footnotes) {