Fix sidenotes in commonmark.
This commit is contained in:
parent
1882ae0d6e
commit
4ecba529e9
2 changed files with 11 additions and 0 deletions
|
@ -22,7 +22,13 @@
|
|||
display: inline;
|
||||
}
|
||||
|
||||
/* kramdown */
|
||||
.reversefootnote {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* commonmark */
|
||||
.footnote-backref {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue