Skip to content

Commit

Permalink
fix: remove leading spaces from org ID inside link
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoarine committed Jul 7, 2023
1 parent 75ea143 commit 5f20aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion org-similarity.el
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Use ID property instead of file path if USE-ID is non-nil."
(if (and (file-exists-p filename)
(string= (file-name-extension filename) "org"))
(let ((title (org-similarity--get-org-title filename))
(id (org-similarity--get-org-id filename)))
(id (string-trim-left (org-similarity--get-org-id filename))))
(if (and use-id id)
(format "[[id:%s][%s]]" id title)
(format "[[%s][%s]]" filename title)))
Expand Down

0 comments on commit 5f20aeb

Please sign in to comment.