From cda1ad0e0b99f2e5195db71486a3ecfb55f26e6b Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 7 Feb 2024 20:54:17 +0100 Subject: favor quarto pandoc over bare pandoc --- bin/any2qmd.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/any2qmd.sh b/bin/any2qmd.sh index 93112a1..03d4f5f 100755 --- a/bin/any2qmd.sh +++ b/bin/any2qmd.sh @@ -6,4 +6,10 @@ INFILE=$1 OUTFILE="$(dirname "$INFILE")/${2:-index.qmd}" -pandoc --to commonmark+smart --wrap none "$INFILE" | perl -pe 's/ --- / -- /g; s/\\(?=['"'"'"])//g; s/^- / * /g;' > "$OUTFILE" +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" -- cgit v1.2.3