From 033677f02141f498ca3e1a84e85bb4c9a6d189c9 Mon Sep 17 00:00:00 2001 Message-Id: <033677f02141f498ca3e1a84e85bb4c9a6d189c9.1650784539.git.yantar92@gmail.com> From: Ihor Radchenko Date: Sun, 24 Apr 2022 15:14:26 +0800 Subject: [PATCH] org-cite-activate: Temporary fix to not fontify links as citations * lisp/oc.el (org-cite-activate): Use heuristics to check previous char to determine if current match is not citation, but link. --- lisp/oc.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/oc.el b/lisp/oc.el index 360f1fadc..147bda368 100644 --- a/lisp/oc.el +++ b/lisp/oc.el @@ -1214,7 +1214,9 @@ (defun org-cite-activate (limit) #'org-cite-fontify-default))) (when (re-search-forward org-element-citation-prefix-re limit t) (let ((cite (org-with-point-at (match-beginning 0) - (org-element-citation-parser)))) + (and (or (bolp) + (not (eq ?\[ (char-before)))) + (org-element-citation-parser))))) (when cite (funcall activate cite) ;; Move after cite object and make sure to return -- 2.35.1