org-export: Do not use broken link handler on non-link elements

* lisp/ox.el (org-export-data): Only catch 'org-link-broken on link
objects.  Signaling 'org-link-broken for other element types, should
not happen and we should _not_ export such elements as "" or "[BROKEN
LINK...]".
This commit is contained in:
Ihor Radchenko 2022-07-23 14:10:45 +08:00
parent 14532ec6a5
commit e5cf0bc840
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 4 additions and 2 deletions

View File

@ -1908,8 +1908,10 @@ Return a string."
(org-element-property :archivedp data)))
(let ((transcoder (org-export-transcoder data info)))
(or (and (functionp transcoder)
(broken-link-handler
(funcall transcoder data nil info)))
(if (eq type 'link)
(broken-link-handler
(funcall transcoder data nil info))
(funcall transcoder data nil info)))
;; Export snippets never return a nil value so
;; that white spaces following them are never
;; ignored.