diff --git a/upload.go b/upload.go index 169328e..5338780 100755 --- a/upload.go +++ b/upload.go @@ -30,7 +30,11 @@ func uploadPTTodo(config Config, transaction *Transaction) error { return err } defer f.Close() - fmt.Fprintf(f, `- {"todo":%q, "tags":%q}%s`, transaction.Format(), config.TodoTag, "\n") + if config.TodoTag == "" { + fmt.Fprintf(f, `- {"todo":%q}%s`, transaction.Format(), "\n") + } else { + fmt.Fprintf(f, `- {"todo":%q, "tags":%q}%s`, transaction.Format(), config.TodoTag, "\n") + } return f.Close() }