From 7dac75b1988e56351ccc43676f553bf7f07b4d49 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 7 Feb 2024 21:11:17 +0100 Subject: use intermediary file to please quarto --- bin/any2qmd.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"~ -- cgit v1.2.3