From 5f37804f2bda738d2442fed200baf0a1c44fb3cb Mon Sep 17 00:00:00 2001 From: bel Date: Tue, 16 Dec 2025 16:39:30 -0700 Subject: [PATCH] tag empty string then no tag --- upload.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() }