Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

todo: Require space after colon to separate task title from description.

N-Shar-mad64d535c2d75
diff --git a/help/collaborative-to-do-lists.md b/help/collaborative-to-do-lists.md
index 1b725ee2f8e..92b8434f855 100644
--- a/help/collaborative-to-do-lists.md
+++ b/help/collaborative-to-do-lists.md
@@ -12,7 +12,7 @@
2. Type `/todo` followed by a space, and the title of the to-do list.
-3. _(optional)_ Type each task on a new line, with its description, if any, after a <kbd>:</kbd>.
+3. _(optional)_ Type each task on a new line, with its description, if any, after a <kbd>:</kbd> and blank space.
4. Click the **Send** (<i class="zulip-icon zulip-icon-send"></i>) button, or
use a [keyboard shortcut](/help/mastering-the-compose-box#toggle-between-ctrl-enter-and-enter-to-send-a-message)
diff --git a/zerver/lib/widget.py b/zerver/lib/widget.py
index 0e2ee2281c4..bb3672ae169 100644
--- a/zerver/lib/widget.py
+++ b/zerver/lib/widget.py
@@ -56,8 +56,8 @@ def parse_todo_extra_data(content: str) -> Any:
task_data = re.sub(r"(\s*[-*]?\s*)", "", line.strip(), count=1)
if len(task_data) > 0:
# a task and its description (optional) are separated
- # by the (first) `:` character
- task_data_array = task_data.split(":", 1)
+ # by the (first) `: ` substring
+ task_data_array = task_data.split(": ", 1)
tasks.append(
{
"task": task_data_array[0].strip(),