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