Skip to content

Commit b7cc229

Browse files
committed
Prevent multiple reserse-footnote from overlapping (fix cotes2020#439)
1 parent a1551cd commit b7cc229

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

_javascript/utils/smooth-scroll.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ $(function() {
2020

2121
const hash = decodeURI(this.hash);
2222
let isFnRef = RegExp(/^#fnref:/).test(hash);
23-
let isFn = RegExp(/^#fn:/).test(hash);
24-
let selector = hash.includes(":") ? hash.replace(/\:/, "\\:") : hash;
23+
let isFn = isFnRef? false : RegExp(/^#fn:/).test(hash);
24+
let selector = hash.includes(":") ? hash.replace(/\:/g, "\\:") : hash;
2525
let target = $(selector);
2626

2727
if (target.length) {

_sass/addon/commons.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ footer {
319319
.reversefootnote {
320320
@at-root a#{&} {
321321
font-size: 0.6rem;
322-
position: absolute;
323322
line-height: 1;
324-
padding-top: 0.5em;
325-
margin-left: 0.5em;
323+
position: relative;
324+
bottom: 0.25em;
325+
margin-left: 0.25em;
326326
border-bottom-style: none !important;
327327
}
328328
}

assets/js/dist/post.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)