Merge pull request #46 from Lex-2008/master
test markdown before editing *.md files
This commit is contained in:
commit
fbaa5118dd
1 changed files with 5 additions and 0 deletions
5
bb.sh
5
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")"
|
||||
|
|
Loading…
Reference in a new issue