summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/any2qmd.sh8
1 files changed, 7 insertions, 1 deletions
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"