Sfoglia il codice sorgente

Merge branch 'maint'

Nicolas Goaziou 11 anni fa
parent
commit
957177cebc
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      lisp/ox-ascii.el

+ 7 - 2
lisp/ox-ascii.el

@@ -751,7 +751,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
@@ -761,8 +760,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.