From 6b826086e0ab505bcf234083a2f6ec6f00ba04b2 Mon Sep 17 00:00:00 2001 From: IGARASHI Masanao Date: Sun, 16 Nov 2014 05:49:24 +0900 Subject: [PATCH] Ignore line breaks when removing duplicates links --- ox-rst.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ox-rst.el b/ox-rst.el index e29692e..9766041 100644 --- a/ox-rst.el +++ b/ox-rst.el @@ -440,8 +440,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.