Fix sidenotes in commonmark.

This commit is contained in:
Michal Jirku 2020-11-24 00:54:08 +01:00
parent 1882ae0d6e
commit 4ecba529e9
2 changed files with 11 additions and 0 deletions

View File

@ -22,7 +22,13 @@
display: inline;
}
/* kramdown */
.reversefootnote {
display: none;
}
/* commonmark */
.footnote-backref {
display: none;
}
}

View File

@ -61,9 +61,14 @@
function loadSidenotes(ww, $fnli, fncount, $fn) {
let minh = 0;
// kramdown
$("sup[role='doc-noteref']").each(function(index, el) {
minh = showSidenote(el.textContent - 1, $(this), ww, $fnli, minh);
});
// commonmark
$("sup[class='footnote-ref']").each(function(index, el) {
minh = showSidenote(el.textContent - 1, $(this), ww, $fnli, minh);
});
if (ww > 420) {
$fn.hide();
} else {