Selaa lähdekoodia

Merge pull request #46 from Lex-2008/master

test markdown before editing *.md files
Carlos Fenollosa 11 vuotta sitten
vanhempi
commit
fbaa5118dd
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      bb.sh

+ 5 - 0
bb.sh

@@ -361,6 +361,11 @@ edit() {
         filename="$1"
     else
         if [[ "${1##*.}" == "md" ]]; then
+            test_markdown
+            if [[ "$?" -ne 0 ]]; then
+                echo "Markdown is not working, please edit HTML file directly."
+                exit
+            fi
             # editing markdown file
             $EDITOR "$1"
             TMPFILE="$(markdown "$1")"