···11+DO THE THING
22+33+44+remember to do part1
55+66+and part2
77+88+and part3
+3-3
.tsk/index
···11-tsk-30 Add flag to only print IDs in list command 1735007126
11+tsk-30 Add flag to only print IDs in list command 1763257109
22tsk-28 Add tool to clean up old tasks not in index 1735006519
33tsk-10 foreign workspaces 1732594198
44tsk-21 Add command to setup git stuff 1732594198
55-tsk-8 IMAP4-based sync 1732594198
55+tsk-8 IMAP4-based sync 1767469318
66tsk-17 Add reopen command 1732594198
77-tsk-16 Add ability to search archived tasks with find command 1732594198
77+tsk-16 Add ability to search archived tasks with find command 1767466011
88tsk-15 Add link identification to tasks 1732594198
99tsk-9 fix timestamp storage and parsing 1732594198
1010tsk-7 allow for creating tasks that don't go to top of stack 1732594198
···184184A quick overview of the format:
185185186186- \!Bolded\! text is surrounded by exclamation marks (!)
187187-- \*Italicized\* text is surrouneded by single asterists (*)
187187+- \*Italicized\* text is surrounded by single asterisks (*)
188188- \_Underlined\_ text is surrounded by underscores (_)
189189-- \~Strikenthrough\~ text is surrounded by tildes (~)
189189+- \~Strikethrough\~ text is surrounded by tildes (~)
190190+- \=Highlighted\= text is surrounded by equals signs (=)
191191+- \`Inline code\` is surrounded by backticks (`)
190192191193Links like in Markdown, along with the wiki-style links documented above.
194194+Raw links can also be written as \<https://example.com\>.
192195193196Misc
194197----
+19-2
src/main.rs
···313313 } else {
314314 "".to_string()
315315 };
316316- let mut body = body.unwrap_or_default();
316316+ // If no body was explicitly provided and the title contains newlines,
317317+ // treat the first line as the title and the rest as the body (like git commit -m)
318318+ let mut body = if body.is_none() {
319319+ if let Some((first_line, rest)) = title.split_once('\n') {
320320+ let extracted_body = rest.to_string();
321321+ title = first_line.to_string();
322322+ extracted_body
323323+ } else {
324324+ String::new()
325325+ }
326326+ } else {
327327+ // Body was explicitly provided, so strip any newlines from title
328328+ title = title.replace(['\n', '\r'], " ");
329329+ body.unwrap_or_default()
330330+ };
317331 if body == "-" {
318332 // add newline so you can type directly in the shell
319333 //eprintln!("");
···327341 body = content.1.to_string();
328342 }
329343 }
344344+ // Ensure title never contains newlines (invariant for index file format)
345345+ title = title.replace(['\n', '\r'], " ");
330346 let task = workspace.new_task(title, body)?;
331347 workspace.handle_metadata(&task, None)?;
332348 Ok(task)
···380396 let pre_links = task::parse(&task.to_string()).map(|pt| pt.intenal_links());
381397 let new_content = open_editor(format!("{}\n\n{}", task.title.trim(), task.body.trim()))?;
382398 if let Some((title, body)) = new_content.split_once("\n") {
383383- task.title = title.to_string();
399399+ // Ensure title never contains newlines (invariant for index file format)
400400+ task.title = title.replace(['\n', '\r'], " ");
384401 task.body = body.to_string();
385402 workspace.handle_metadata(&task, pre_links)?;
386403 task.save()?;