#!/bin/sh set -au INFILE=$1 OUTFILE="$(dirname "$INFILE")/${2:-index.qmd}" pandoc --to commonmark+smart --wrap none "$INFILE" | perl -pe 's/ --- / -- /g; s/\\(?=['"'"'"])//g; s/^- / * /g;' > "$OUTFILE"