summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-02-07 20:54:17 +0100
committerJonas Smedegaard <dr@jones.dk>2024-02-07 20:54:34 +0100
commitcda1ad0e0b99f2e5195db71486a3ecfb55f26e6b (patch)
tree8d0d7f74284d20f091e3e5535aa3595bf67e07bf /bin
parent46acc771e970dffcecbae23c322b649d4f27cf62 (diff)
favor quarto pandoc over bare pandoc
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"