mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): only update relative path of file links (#1226)
This commit is contained in:
@ -1321,7 +1321,8 @@ replaced links are made relative to the current buffer."
|
||||
(when-let ((link (org-element-lineage (org-element-context) '(link) t)))
|
||||
(let ((type (org-element-property :type link))
|
||||
(path (org-element-property :path link)))
|
||||
(when (and (f-relative-p path)
|
||||
(when (and (string= type "file")
|
||||
(f-relative-p path)
|
||||
(org-in-regexp org-link-bracket-re 1))
|
||||
(let* ((file-path (expand-file-name path (file-name-directory old-path)))
|
||||
(new-path (org-roam-link-get-path file-path)))
|
||||
|
Reference in New Issue
Block a user