Skip to content

Commit

Permalink
fix bug for backlinks: when the filename contains japanese (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
yemeishenme committed May 17, 2021
1 parent 2122a61 commit ea4082f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
.contentWindow.location.href);
let string = url.pathname.substring(
1, url.pathname.lastIndexOf('.'));
string = decodeURI(string);
for (let i = 0; i < select2Data.length; i++) {
if (select2Data[i].id === string) {
window.open("org-protocol://roam-file?file="
Expand Down Expand Up @@ -687,6 +688,7 @@
$("#filenode").on("load", function () {
let string = document.getElementById("filenode")
.contentWindow.location.href;
string = decodeURI(string)
string = string.substring(string.lastIndexOf('/') + 1);
string = string.substring(0, string.lastIndexOf('.'));
let link;
Expand Down

0 comments on commit ea4082f

Please sign in to comment.