org-e-html.el (org-e-html-link): Don't add attributes to the link when they are already part of the link description

* org-e-html.el (org-e-html-link): Don't add attributes to the
link when they are already part of the link description.
This commit is contained in:
Bastien Guerry 2013-01-31 10:44:15 +01:00
parent b9c506b41e
commit ad45f6cd7f
1 changed files with 11 additions and 9 deletions

View File

@ -2141,15 +2141,17 @@ INFO is a plist holding contextual information. See
(if (not (file-name-absolute-p raw-path)) raw-path
(concat "file://" (expand-file-name raw-path))))
(t raw-path)))
;; Extract attributes from parent's paragraph.
(attributes
(let ((attr (mapconcat
'identity
(org-element-property
:attr_html (org-export-get-parent-element link))
" ")))
(if attr (concat " " attr) "")))
protocol)
attributes protocol)
;; Extract attributes from parent's paragraph.
(and (setq attributes
(mapconcat
'identity
(let ((att (org-element-property
:attr_html (org-export-get-parent-element link))))
(unless (and desc (string-match (regexp-quote (car att)) desc)) att))
" "))
(setq attributes (concat " " attributes)))
(cond
;; Image file.
((and (or (eq t org-e-html-inline-images)