-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trs/reflow-markdown-in-release-notes'
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |