Skip to content

Commit

Permalink
Merge pull request #113 from mirguest/master
Browse files Browse the repository at this point in the history
Handle the URL with parent directories
  • Loading branch information
goktug97 committed Nov 29, 2020
2 parents fde2636 + 8fd9143 commit 8d67572
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,10 @@
string = string.substring(0, string.lastIndexOf('.'));
let link;
for (let i = 0; i < select2Data.length; i++) {
if (select2Data[i].id === string) {
// handle the URLs of select2Data[i] with parent directories
let selstr = select2Data[i].id;
selstr = selstr.substring(selstr.lastIndexOf('/')+1);
if (selstr === string) {
link = `org-roam-buffer?path=${select2Data[i].path}&` +
`label=${select2Data[i].text}&token=${token}`;
break
Expand Down

0 comments on commit 8d67572

Please sign in to comment.