summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/any2qmd.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/any2qmd.sh b/bin/any2qmd.sh
index ea978b8..cbacf7b 100755
--- a/bin/any2qmd.sh
+++ b/bin/any2qmd.sh
@@ -12,4 +12,7 @@ else
PANDOC=pandoc
fi
-$PANDOC --to commonmark+smart --wrap none "$INFILE" | perl -pe 's/ --- / -- /g; s/\\(?=['"'"'"])//g; s/^- / * /g;' > "$OUTFILE"
+# use intermediary file (cannot use pipe with quarto wrapper)
+$PANDOC --to commonmark+smart --wrap none --output "$OUTFILE"~ "$INFILE"
+perl -pe 's/ --- / -- /g; s/\\(?=['"'"'"])//g; s/^- / * /g;' < "$OUTFILE"~ > "$OUTFILE"
+rm "$OUTFILE"~