scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

commit 1616d36b96531536fec57d403fb22c5eece65132
parent a05e95dad3e633492f6d5d0029b6e6a0e00526f6
Author: GeaRSiX <gearsix@tuta.io>
Date:   Mon, 27 Jul 2020 12:04:19 +0100

updated src/preview-md.sh

- added "--unsafe" arg to cmark
- changed $out to /tmp/$1
- if $out exists, it's removed before cmark is run

Diffstat:
Msrc/preview-md.sh | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/preview-md.sh b/src/preview-md.sh @@ -4,10 +4,11 @@ # dependencies: cmark # e.g.$ preview-md README.md --open -mdconv=cmark -out=~/tmp/README.html +mdconv="cmark --unsafe" +out=/tmp/README.html -${mdconv} $1 >> $out +if [ -e $out ]; then rm $out; fi +$mdconv $1 >> $out if [ $? -eq 0 ]; then echo "succesfully converted to $out" if [ ! -z $2 ] && [ $2 = "--open" ] || [ $2 = "-o" ]; then