- Issue created by @sonfd
- π¬π§United Kingdom scott_euser
Work for this us ongoing here: https://www.drupal.org/project/footnotes/issues/3519927 π Citations are not reused when collapsing footnotes across multiple fields Active
Thanks!
Collapse footnotes with identical content only collapses some footnotes. Specifically, FootnotesFilter::getMatchingFootnoteKey()
only checks $this->storedFootnotes
, but it should also check $this->footnotesGroup->matches
(though matches is a protected variable).
Update FootnotesFilter::getMatchingFootnoteKey()
to also check $this->footnotesGroup->matches
for identical footnotes.
For example:
protected function getMatchingFootnoteKey(string $text): string {
// $matches is a protected var so we'll need to add a getter
foreach ($this->footnotesGroup->matches as $key => $footnotes) {
foreach ($footnotes as $footnote) {
if ($text == $footnote['text']) {
return $key;
}
}
}
foreach ($this->storedFootnotes as $key => $footnotes) {
foreach ($footnotes as $footnote) {
if ($text == $footnote['text']) {
return $key;
}
}
}
return '';
}
None
None
None
Active
4.0
Footnotes
Work for this us ongoing here: https://www.drupal.org/project/footnotes/issues/3519927 π Citations are not reused when collapsing footnotes across multiple fields Active
Thanks!