tag empty string then no tag

master
bel 2025-12-16 16:39:30 -07:00
parent 8cfccf1eb0
commit 5f37804f2b
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ func uploadPTTodo(config Config, transaction *Transaction) error {
return err return err
} }
defer f.Close() 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() return f.Close()
} }