Thanks, here's an updated patch with the ORG-NEWS update as well as the Link and Reported-by commit message fields.
Cheers, Derek On Sat, May 16, 2026 at 8:30 AM Ihor Radchenko <[email protected]> wrote: > Derek Chen-Becker <[email protected]> writes: > > > Attached is a patch which conditionally formats TOC links depending on > > whether they're images. I promoted the default link transcoder into its > own > > defun to reduce duplication. I added some new unit tests and all existing > > tests pass. > > Thanks! > Could you also add a news entry? > This is technically a breaking change that may affect users. > > > Subject: [PATCH] Generate images in TOC for HTML export > > > > * lisp/ox.el (org-export-toc-entry-backend): Extract the lambda for link > > formatting into a new `org-export-toc-default-link-transcoder' defun for > > use in other exporters. > > * lisp/ox-html.el (org-html--format-toc-headline): Format image links for > > the TOC using `org-html-link', but all other link types maintain > formatting > > using the new `org-export-toc-default-link-transcoder'. > > * testing/lisp/test-ox-html.el (org-html/test-toc-images, > > org-html/test-toc-links): Create new unit tests to exercise the > conditional > > formatting of TOC links for image and non-image links. > > > > Prior to this, image links would be rendered in headers, but would be > > converted into a plain text filename in the TOC. > > It is also a good idea to add Reported-by: and Link: entries to the > commit message. > > -- > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> > -- +---------------------------------------------------------------+ | Derek Chen-Becker | | GPG Key available at https://keybase.io/dchenbecker and | | https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org | | Fngrprnt: EB8A 6480 F0A3 C8EB C1E7 7F42 AFC5 AFEE 96E4 6ACC | +---------------------------------------------------------------+
0001-Generate-images-in-TOC-for-HTML-export.patch
Description: Binary data
