diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-04-03 22:48:25 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-04-03 22:50:53 +0200 |
commit | a6485af3e4c6e1942fa6c19d3629fc4fb165693a (patch) | |
tree | 1689a6abdd44c64bebea0d844182878bc9207493 | |
parent | 91175a31ee73d10f61a57a290dd588fa484be1f2 (diff) | |
download | org-mode-a6485af3e4c6e1942fa6c19d3629fc4fb165693a.tar.gz |
ox-ascii: Ignore line breaks when removing duplicates links
* lisp/ox-ascii.el (org-ascii--unique-links): Ignore white spaces when
uniquifying links in section.
Thanks to Mathias Bauer for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84548
-rw-r--r-- | lisp/ox-ascii.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 11ce0c3..6208cdb 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -750,7 +750,6 @@ generation. INFO is a plist used as a communication channel." (defun org-ascii--unique-links (element info) "Return a list of unique link references in ELEMENT. - ELEMENT is either a headline element or a section element. INFO is a plist used as a communication channel." (let* (seen @@ -760,8 +759,14 @@ is a plist used as a communication channel." ;; Update SEEN links along the way. (lambda (link) (let ((footprint + ;; Normalize description in footprints. (cons (org-element-property :raw-link link) - (org-element-contents link)))) + (let ((contents (org-element-contents link))) + (and contents + (replace-regexp-in-string + "[ \r\t\n]+" " " + (org-trim + (org-element-interpret-data contents)))))))) ;; Ignore LINK if it hasn't been translated already. ;; It can happen if it is located in an affiliated ;; keyword that was ignored. |