From 8980333e23bb82a063f7ac250b565e0e8970af9c Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Tue, 23 Dec 2025 03:07:48 -0500 Subject: [PATCH] Add support for automatic Markdown task list continuation when using uppercase X (#45561) Release Notes: - Added support for automatic Markdown task list continuation when using uppercase X --- crates/editor/src/editor_tests.rs | 11 +++++++++++ crates/languages/src/markdown/config.toml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 6d53c59d90a8df5d74d0879e965f7f2643deaefa..dc990d69f218dad083c888f75819cadae3f22cb1 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -29602,6 +29602,17 @@ async fn test_newline_task_list_continuation(cx: &mut TestAppContext) { - [ ] ˇ "}); + // Case 2.1: Works with uppercase checked marker too + cx.set_state(indoc! {" + - [X] completed taskˇ + "}); + cx.update_editor(|e, window, cx| e.newline(&Newline, window, cx)); + cx.wait_for_autoindent_applied().await; + cx.assert_editor_state(indoc! {" + - [X] completed task + - [ ] ˇ + "}); + // Case 3: Cursor position doesn't matter - content after marker is what counts cx.set_state(indoc! {" - [ ] taˇsk diff --git a/crates/languages/src/markdown/config.toml b/crates/languages/src/markdown/config.toml index 423a4c008f6e8a64f3c4e883b0d6e2bde65c88ae..10b1e49757edc106c76e0dc7c591098ebdc6723f 100644 --- a/crates/languages/src/markdown/config.toml +++ b/crates/languages/src/markdown/config.toml @@ -22,7 +22,7 @@ rewrap_prefixes = [ ] unordered_list = ["- ", "* ", "+ "] ordered_list = [{ pattern = "(\\d+)\\. ", format = "{1}. " }] -task_list = { prefixes = ["- [ ] ", "- [x] "], continuation = "- [ ] " } +task_list = { prefixes = ["- [ ] ", "- [x] ", "- [X] "], continuation = "- [ ] " } auto_indent_on_paste = false auto_indent_using_last_non_empty_line = false