diff options
author | Alexey Shpakovsky <alexey@shpakovsky.ru> | 2014-06-26 04:08:31 +0200 |
---|---|---|
committer | Aleksei Shpakovskii <alekseis@opera.com> | 2014-06-26 08:33:00 +0200 |
commit | 555db3167f49fffdfe8a394a50c7e0c10db2bd84 (patch) | |
tree | 36a9e416e6ba43a539bdb2ac537b5f26dd03104f /bb.sh | |
parent | 840d24c4acdcee3f79ea771f7caf4b2eecd6bee2 (diff) |
use markdown by default (if available) when posting with `bb.sh post`
Diffstat (limited to 'bb.sh')
-rwxr-xr-x | bb.sh | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -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" |