tag empty string then no tag
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user