From 555db3167f49fffdfe8a394a50c7e0c10db2bd84 Mon Sep 17 00:00:00 2001 From: Alexey Shpakovsky Date: Thu, 26 Jun 2014 04:08:31 +0200 Subject: [PATCH] use markdown by default (if available) when posting with `bb.sh post` --- bb.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bb.sh b/bb.sh index fcb6d99..3a72441 100755 --- a/bb.sh +++ b/bb.sh @@ -583,16 +583,9 @@ parse_file() { # Manages the creation of the text file and the parsing to html file # also the drafts write_entry() { - fmt="html"; f="$2" - [[ "$2" == "-m" ]] && fmt="md" && f="$3" - if [[ "$fmt" == "md" ]]; then - test_markdown - if [[ "$?" -ne 0 ]]; then - echo "Markdown is not working, please use HTML. Press a key to continue..." - fmt="html" - read - fi - fi + test_markdown && fmt="md" || fmt="html" + f="$2" + [[ "$2" == "-html" ]] && fmt="html" && f="$3" if [[ "$f" != "" ]]; then TMPFILE="$f"