mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-10 07:16:20 -04:00
Use denote-link-markdown-follow only if there is a link
Otherwise, we are breaking general markdown-mode functionality. Thanks to pmenair for bringing this matter to my attention in issue 290: <https://github.com/protesilaos/denote/issues/290>.
This commit is contained in:
parent
1718cac272
commit
fa8bda2cab
|
|
@ -5339,7 +5339,7 @@ Denote is meant to be a collective effort. Every bit of help matters.
|
|||
Monnier, Stefan Thesing, Thibaut Benjamin, Tomasz Hołubowicz, Vedang
|
||||
Manerikar, Wesley Harvey, Zhenxu Xu, arsaber101, ezchi, jarofromel,
|
||||
leinfink (Henrik), l-o-l-h (Lincoln), mattyonweb, maxbrieiev,
|
||||
mentalisttraceur, relict007.
|
||||
mentalisttraceur, pmenair, relict007.
|
||||
|
||||
+ Ideas and/or user feedback :: Abin Simon, Aditya Yadav, Alan
|
||||
Schmitt, Aleksandr Vityazev, Alex Hirschfeld, Alfredo Borrás, Ashton
|
||||
|
|
|
|||
|
|
@ -3954,9 +3954,9 @@ positions, limit the process to the region in-between."
|
|||
(defun denote-link-markdown-follow (link)
|
||||
"Function to open Denote file present in LINK.
|
||||
To be assigned to `markdown-follow-link-functions'."
|
||||
(string-match denote-id-regexp link)
|
||||
(funcall denote-link-button-action
|
||||
(denote-get-path-by-id (match-string 0 link))))
|
||||
(when (ignore-errors (string-match denote-id-regexp link))
|
||||
(funcall denote-link-button-action
|
||||
(denote-get-path-by-id (match-string 0 link)))))
|
||||
|
||||
(eval-after-load 'markdown-mode
|
||||
'(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow))
|
||||
|
|
|
|||
Loading…
Reference in a new issue