Filter out empty whitespace when considering new tags.

This commit is contained in:
Jonathan Bernard 2018-04-16 04:29:19 -05:00
parent 72c332fa45
commit 81d326c5c8
2 changed files with 4 additions and 4 deletions

View File

@ -387,7 +387,7 @@ Options:
let now = getLocalTime(getTime())
# Parse arguments
let args = docopt(doc, version = "ptk 0.11.2")
let args = docopt(doc, version = "ptk 0.11.3")
if args["--echo-args"]: echo $args
@ -472,7 +472,7 @@ Options:
time: if args["--time"]: parseTime($args["--time"]) else: now,
summary: STOP_MSG,
notes: args["--notes"] ?: "",
tags: (args["--tags"] ?: "").split({',', ';'}))
tags: (args["--tags"] ?: "").split({',', ';'}).filterIt(not it.isNilOrWhitespace))
timeline.marks.add(newMark)
@ -514,7 +514,7 @@ Options:
time: if args["--time"]: parseTime($args["--time"]) else: now,
summary: args["<summary>"] ?: "",
notes: args["--notes"] ?: "",
tags: (args["--tags"] ?: "").split({',', ';'}))
tags: (args["--tags"] ?: "").split({',', ';'}).filterIt(not it.isNilOrWhitespace))
if args["--edit"]: edit(newMark)

View File

@ -1,6 +1,6 @@
# Package
version = "0.11.2"
version = "0.11.3"
author = "Jonathan Bernard"
description = "Personal Time Keeper"
license = "MIT"