Skip to content

Commit

Permalink
org-export: Do not use broken link handler on non-link elements
Browse files Browse the repository at this point in the history
* 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...]".
  • Loading branch information
yantar92 committed Jul 23, 2022
1 parent 14532ec commit e5cf0bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lisp/ox.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e5cf0bc

Please sign in to comment.