summaryrefslogtreecommitdiff
path: root/org-link-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-link-edit.el')
-rw-r--r--org-link-edit.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/org-link-edit.el b/org-link-edit.el
index a303adf..915591a 100644
--- a/org-link-edit.el
+++ b/org-link-edit.el
@@ -155,7 +155,7 @@ If N is negative, slurp leading blobs instead of trailing blobs."
(user-error "Not enough blobs after the link"))
(point)))
(let ((slurped (buffer-substring-no-properties end (point))))
- (setq slurped (replace-regexp-in-string "\n" " " slurped))
+ (setq slurped (replace-regexp-in-string "\n+" " " slurped))
(when (and (= (length desc) 0)
(string-match "^\\s-+\\(.*\\)" slurped))
(setq slurped (match-string 1 slurped)))
@@ -200,7 +200,7 @@ If N is negative, slurp trailing blobs instead of leading blobs."
(when (and (= (length desc) 0)
(string-match "\\(.*\\)\\s-+$" slurped))
(setq slurped (match-string 1 slurped)))
- (setq slurped (replace-regexp-in-string "\n" " " slurped))
+ (setq slurped (replace-regexp-in-string "\n+" " " slurped))
(setq desc (concat slurped desc)
beg (- beg (length slurped)))
(delete-region (point) end)