Skip to content

Commit

Permalink
limit the style on section.footnotes instead of .footnotes, and place…
Browse files Browse the repository at this point in the history
… footnotes in <section>
  • Loading branch information
yihui committed Oct 10, 2023
1 parent 41c8f91 commit 2a3f0ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inst/resources/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ table, .body h2 { border-bottom: 1px solid #666; }
.body .appendix, .appendix ~ h2 { border-bottom-style: dashed; }
.footnote-ref a::before { content: "["; }
.footnote-ref a::after { content: "]"; }
.footnotes::before {
section.footnotes::before {
content: "";
display: block;
max-width: 20em;
Expand Down
4 changes: 2 additions & 2 deletions inst/resources/snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
if (fn) s.querySelectorAll('.footnote-ref > a[href^="#fn"]').forEach(a => {
const li = fn.querySelector('li' + a.getAttribute('href'));
if (!li) return;
let f = s.querySelector('div.footnotes');
let f = s.querySelector('section.footnotes');
if (!f) {
f = newEl('div', 'footnotes'); s.append(f);
f = newEl('section', 'footnotes'); s.append(f);
}
f.append(li);
li.firstElementChild?.insertAdjacentHTML('afterbegin', `[${a.innerHTML}] `);
Expand Down

0 comments on commit 2a3f0ff

Please sign in to comment.