Explorar o código

Merge pull request #46 from Lex-2008/master

test markdown before editing *.md files
Carlos Fenollosa %!s(int64=11) %!d(string=hai) anos
pai
achega
fbaa5118dd
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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")"