Skip to content

Commit

Permalink
Handle the URL with parent directories
Browse files Browse the repository at this point in the history
  • Loading branch information
mirguest committed Nov 15, 2020
1 parent fde2636 commit 8fd9143
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 8fd9143

Please sign in to comment.