aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/render-manpage.sh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-30 17:38:36 +0100
committereldritch horrors <pennae@lix.systems>2024-04-01 20:15:28 +0000
commitd2aca15f31f39ab1548ae8410932293504d0eb36 (patch)
treeeee21c16ded618fa16609249cc44fc3dcab5c44a /doc/manual/render-manpage.sh
parented2bb919e79715918a88646c15a6642e7dcd3a98 (diff)
doc: remove the -- unescaping hack
lowdown has an option to disable this behavior. use it. Change-Id: I06d4201b7f528021ddb8e94ac6baff385402e080
Diffstat (limited to 'doc/manual/render-manpage.sh')
-rwxr-xr-xdoc/manual/render-manpage.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/doc/manual/render-manpage.sh b/doc/manual/render-manpage.sh
index d89c29482..42f13911e 100755
--- a/doc/manual/render-manpage.sh
+++ b/doc/manual/render-manpage.sh
@@ -2,10 +2,10 @@
set -euo pipefail
-unescape_dashes=
+lowdown_args=
-if [ "$1" = --unescape-dashes ]; then
- unescape_dashes=yes
+if [ "$1" = --out-no-smarty ]; then
+ lowdown_args=--out-no-smarty
shift
fi
@@ -18,10 +18,5 @@ outfile="$5"
printf "Title: %s\n\n" "$title" > "$tmpfile"
cat "$infile" >> "$tmpfile"
"$(dirname "$0")"/process-includes.sh "$infile" "$tmpfile"
-lowdown -sT man --nroff-nolinks -M section="$section" "$tmpfile" -o "$outfile"
-if [ -n "$unescape_dashes" ]; then
- # fix up `lowdown`'s automatic escaping of `--`
- # https://github.com/kristapsdz/lowdown/blob/edca6ce6d5336efb147321a43c47a698de41bb7c/entity.c#L202
- sed -i 's/\e\[u2013\]/--/' "$outfile"
-fi
+lowdown -sT man --nroff-nolinks $lowdown_args -M section="$section" "$tmpfile" -o "$outfile"
rm "$tmpfile"