ox-ascii: Fix broken link export for broken fuzzy links

* lisp/ox-ascii.el (org-ascii--describe-links): Ignore all kinds of
broken links, not just broken id links.

Reported-by: Pablo Aguado <aguadopd@hotmail.com>
Link: https://orgmode.org/list/SA1P223MB070291E02E95707C31342244C2102@SA1P223MB0702.NAMP223.PROD.OUTLOOK.COM
This commit is contained in:
Ihor Radchenko 2024-04-24 15:42:39 +03:00
parent c6c5474b7e
commit 80b474db00
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 9 additions and 8 deletions

View File

@ -954,14 +954,15 @@ channel."
;; Only links with a description need an entry. Other are
;; already handled in `org-ascii-link'.
(when description
(let ((dest (if (equal type "fuzzy")
(org-export-resolve-fuzzy-link link info)
(let ((dest
;; Ignore broken links. On broken link,
;; `org-export-resolve-id-link' will throw an
;; error and we will return nil.
(condition-case nil
(org-export-resolve-id-link link info)
(org-link-broken nil)))))
(if (equal type "fuzzy")
(org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info))
(org-link-broken nil))))
(when dest
(concat
(org-ascii--fill-string