Skip to content

v0.3.24

Choose a tag to compare

@github-actions github-actions released this 17 May 16:43
· 11 commits to master since this release
v0.3.24
d84f1ed

Linux-X64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
Windows-X64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
macOS-ARM64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4
macOS-X64: pandoc-crossref v0.3.24 git commit d84f1ed (HEAD) built with Pandoc v3.9, pandoc-types v1.23.1.1 and GHC 9.8.4

Changelog

  • Fix for #506

    A prior fix/workaround for jgm/pandoc#9720 had
    unintentionally clobbered explicitly-specified alt attributes on images.

    Unfortunately, Pandoc does not expose alt attribute explicitly to filters,
    instead it's only seen as image caption. So a simple heuristic is used:
    if image caption does not match the figure caption, we assume it's an
    explicitly-specified alt text and preserve it. Otherwise, clobber it.

  • preserveAltText option. As stated above, if alt is missing or matches the
    figure caption, it will be clobbered, and figure caption will be generated
    by Pandoc with aria-hidden="true". When preserveAltText is set to True,
    pandoc-crossref will preserve the alt text (be it explicit or implicit from
    caption) verbatim, forcing Pandoc to produce both alt text and figure
    caption in the output. The hope is this may prove useful in some workflows,
    but you definitely should just specify alt text on all your images if you
    care about screen readers at all.