From 9aea42649dbee4ca4cb6db1adee75d0d05918902 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Thu, 1 Jan 2026 01:07:24 +0100 Subject: [PATCH] fix link with a description to a headline --- ox-rst.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ox-rst.el b/ox-rst.el index 8211cdd..9a547b3 100644 --- a/ox-rst.el +++ b/ox-rst.el @@ -1267,7 +1267,8 @@ INFO is a plist holding contextual information." (if (plist-get info :rst-link-use-ref-role) (if desc (format " :ref:`%s <%s>`" desc raw-path) (format " :ref:`%s`" raw-path)) - (format "`%s`_" raw-path)) + (if desc (format "`%s <%s>`" desc raw-path) + (format "`%s`_" raw-path))) (format "`%s`_" (org-rst--build-title destination info nil)))) ;; Fuzzy link points to a target. (otherwise