Skip to content

Commit

Permalink
Merge branch 'trs/reflow-markdown-in-release-notes'
Browse files Browse the repository at this point in the history
  • Loading branch information
tsibley committed Jan 22, 2024
2 parents 5cd02ae + ce1b578 commit 362cfad
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion devel/create-github-release
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"
}

Expand Down
22 changes: 22 additions & 0 deletions devel/reflow-markdown
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/jgm/pandoc/releases/latest> and exec-ing those à
# la what our devel/pyoxidizer does.
# -trs, 18 Jan 2024
"$devel"/within-container --interactive pandoc/core "$@"
}

main "$@"

0 comments on commit 362cfad

Please sign in to comment.