emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ox-md.el/markdown-hyperlink


From: Kyle Meyer
Subject: Re: [PATCH] ox-md.el/markdown-hyperlink
Date: Fri, 22 Jan 2021 00:13:14 -0500

[ Sorry for the delay. ]

turbo.cafe@clovermail.net writes:

> exporting to markdown loses radio target hyperlinks.

Thanks for the patch, and thanks TEC for testing it out.

Pushed (3916a5740).

> Subject: [PATCH] ox-md.el/markdown-hyperlink
>
> * ox-md.el (org-md-link): format markdown hyperlink from org radio target

The subject you posted in the other thread at
<https://orgmode.org/list/87wnz2fa2h.fsf@atk.sk> was a bit more
descriptive, so I've used that and made a few other tweaks to the commit
message when applying.

> diff --git a/lisp/ox-md.el b/lisp/ox-md.el
> index 1d20c04f4..a63815e43 100644
> --- a/lisp/ox-md.el
> +++ b/lisp/ox-md.el
> @@ -543,7 +543,13 @@ INFO is a plist holding contextual information.  See
>       ((string= type "coderef")
>        (format (org-export-get-coderef-format path desc)
>             (org-export-resolve-coderef path info)))
> -     ((equal type "radio") desc)
> +     ((string= type "radio")
> +      (let ((destination (org-export-resolve-radio-link link info)))
> +     (if (not destination) desc
> +       (format "<a href=\"#%s\"%s>%s</a>"
> +               (org-export-get-reference destination info)
> +               ""

I dropped this second argument, which is unnecessary (and I suspect a
leftover from copying and adjusting what's in ox-html).

> +               desc))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]