Browse Source

Clean up all links in headline when linking to it

So far, we only considered one link in a headline and replaced it with its
description when linking to it.  When there are multiple links, this will fail.
This commit changes this by iterating over all links in the headline, not only
the first one.
master
Daniel 1 month ago
parent
commit
0899a9079e
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      site-lisp/db-org.el

+ 1
- 1
site-lisp/db-org.el View File

@@ -738,7 +738,7 @@ link."
738 738
     ;; When item is a link, only use it's description when available; otherwise
739 739
     ;; use the link part
740 740
     (save-match-data
741
-      (when (string-match org-link-bracket-re item)
741
+      (while (string-match org-link-bracket-re item)
742 742
         (let ((desc (or (match-string-no-properties 2 item)
743 743
                         (match-string-no-properties 1 item))))
744 744
           (setq item (concat (substring item 0 (match-beginning 0))

Loading…
Cancel
Save