Skip to content

Commit

Permalink
Prevent multiple reserse-footnote from overlapping (fix #439)
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Nov 29, 2021
1 parent ca8e85a commit 0126ab6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions _javascript/utils/smooth-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ $(function() {

const hash = decodeURI(this.hash);
let isFnRef = RegExp(/^#fnref:/).test(hash);
let isFn = RegExp(/^#fn:/).test(hash);
let selector = hash.includes(":") ? hash.replace(/\:/, "\\:") : hash;
let isFn = isFnRef? false : RegExp(/^#fn:/).test(hash);
let selector = hash.includes(":") ? hash.replace(/\:/g, "\\:") : hash;
let target = $(selector);

if (target.length) {
Expand Down
6 changes: 3 additions & 3 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ footer {
.reversefootnote {
@at-root a#{&} {
font-size: 0.6rem;
position: absolute;
line-height: 1;
padding-top: 0.5em;
margin-left: 0.5em;
position: relative;
bottom: 0.25em;
margin-left: 0.25em;
border-bottom-style: none !important;
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/dist/post.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0126ab6

Please sign in to comment.