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