Skip to content

Commit

Permalink
fix a corner case: for footnotes on the last slide, we should create …
Browse files Browse the repository at this point in the history
…a new section.footnotes instead of using the global footnotes section on this slide, because the global footnotes section will be removed later
  • Loading branch information
yihui committed May 29, 2024
1 parent 94edbd8 commit 92042e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
const li = fn.querySelector('li' + a.getAttribute('href'));
if (!li) return;
let f = s.querySelector('section.footnotes');
if (!f) {
if (!f || f.contains(li)) {
f = newEl('section', 'footnotes'); footer.before(f);
}
f.append(li);
Expand Down

0 comments on commit 92042e6

Please sign in to comment.