главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
path: root/bb.sh
diff options
context:
space:
mode:
authorAlexey Shpakovsky <alexey@shpakovsky.ru>2014-06-26 04:08:31 +0200
committerAleksei Shpakovskii <alekseis@opera.com>2014-06-26 08:33:00 +0200
commit555db3167f49fffdfe8a394a50c7e0c10db2bd84 (patch)
tree36a9e416e6ba43a539bdb2ac537b5f26dd03104f /bb.sh
parent840d24c4acdcee3f79ea771f7caf4b2eecd6bee2 (diff)
use markdown by default (if available) when posting with `bb.sh post`
Diffstat (limited to 'bb.sh')
-rwxr-xr-xbb.sh13
1 files 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"