diff --git a/devel/create-github-release b/devel/create-github-release index 4c6edc6e..7b792e2d 100755 --- a/devel/create-github-release +++ b/devel/create-github-release @@ -31,7 +31,7 @@ main() { --title "$version" \ --target "$commit" \ ${pre_release:+--prerelease} \ - --notes-file <(preamble; "$devel"/changes "$version") \ + --notes-file <(preamble; "$devel"/changes "$version" | "$devel"/reflow-markdown) \ "${assets[@]}" } diff --git a/devel/reflow-markdown b/devel/reflow-markdown new file mode 100755 index 00000000..2c94950b --- /dev/null +++ b/devel/reflow-markdown @@ -0,0 +1,22 @@ +#!/bin/bash +# Reflows paragraphs in Markdown to single long lines while preserving verbatim +# code blocks, lists, and what not. +set -euo pipefail + +devel="$(dirname "$0")" + +main() { + pandoc --wrap none --from markdown --to markdown +} + +pandoc() { + # XXX TODO: This relies on Docker being available, which it typically is in + # our development environments (local and CI). If Docker ever poses a + # burden, we could switch to just-in-time downloading of static binaries + # from and exec-ing those à + # la what our devel/pyoxidizer does. + # -trs, 18 Jan 2024 + "$devel"/within-container --interactive pandoc/core "$@" +} + +main "$@"