From 79448114e2867a3fa36507f5666865394e086242 Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 13 Apr 2026 04:42:34 -0400 Subject: [PATCH 1/4] editor: Add SelectInsideDelimiters and SelectAroundDelimiters actions --- crates/editor/src/actions.rs | 4 ++ crates/editor/src/editor.rs | 65 +++++++++++++++++++++++++ crates/editor/src/editor_tests.rs | 80 +++++++++++++++++++++++++++++++ crates/editor/src/element.rs | 2 + 4 files changed, 151 insertions(+) diff --git a/crates/editor/src/actions.rs b/crates/editor/src/actions.rs index 077152bff0e549..3ac31bb05533c4 100644 --- a/crates/editor/src/actions.rs +++ b/crates/editor/src/actions.rs @@ -630,6 +630,10 @@ actions!( MoveToBeginning, /// Moves cursor to the enclosing bracket. MoveToEnclosingBracket, + /// Selects the content inside the nearest enclosing delimiters (brackets, braces, parentheses, or quotes). + SelectInsideDelimiters, + /// Selects the content inside the nearest surrounding delimiters, including the delimiters themselves. + SelectAroundDelimiters, /// Moves cursor to the end of the document. MoveToEnd, /// Moves cursor to the end of the paragraph. diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index bc343ca0d4c8fb..c8307c283f4697 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -17624,6 +17624,71 @@ impl Editor { }); } + pub fn select_inside_delimiters( + &mut self, + _: &SelectInsideDelimiters, + window: &mut Window, + cx: &mut Context, + ) { + self.select_delimiters_impl(false, window, cx); + } + + pub fn select_around_delimiters( + &mut self, + _: &SelectAroundDelimiters, + window: &mut Window, + cx: &mut Context, + ) { + self.select_delimiters_impl(true, window, cx); + } + + fn select_delimiters_impl( + &mut self, + include_brackets: bool, + window: &mut Window, + cx: &mut Context, + ) { + self.hide_mouse_cursor(HideMouseCursorOrigin::MovementAction, cx); + self.change_selections(Default::default(), window, cx, |s| { + s.move_offsets_with(&mut |snapshot, selection| { + // For languages that don't register quotes as bracket pairs in their + // brackets.scm (notably Markdown inline content), fall back to detecting + // string-like nodes via the syntax tree. + // The same node kinds are used by select_larger_syntax_node. + if !include_brackets { + if let Some((node, node_range)) = + snapshot.syntax_ancestor(selection.start..selection.end) + { + if ["string_content", "inline"].contains(&node.kind()) { + selection.start = node_range.start; + selection.end = node_range.end; + selection.reversed = false; + selection.goal = SelectionGoal::None; + return; + } + } + } + + // Fall back to the nearest bracket pair via tree-sitter. + let Some((open, close)) = snapshot + .innermost_enclosing_bracket_ranges(selection.start..selection.end, None) + else { + return; + }; + + let (start, end) = if include_brackets { + (open.start, close.end) + } else { + (open.end, close.start) + }; + selection.start = start; + selection.end = end; + selection.reversed = false; + selection.goal = SelectionGoal::None; + }) + }); + } + pub fn undo_selection( &mut self, _: &UndoSelection, diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index c29df272d35af5..3638c811700707 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -20296,6 +20296,86 @@ async fn test_move_to_enclosing_bracket(cx: &mut TestAppContext) { ); } +#[gpui::test] +async fn test_select_inside_delimiters(cx: &mut TestAppContext) { + init_test(cx, |_| {}); + + let mut cx = EditorLspTestContext::new_typescript(Default::default(), cx).await; + + #[track_caller] + fn assert(before: &str, after: &str, cx: &mut EditorLspTestContext) { + let _state_context = cx.set_state(before); + cx.run_until_parked(); + cx.update_editor(|editor, window, cx| { + editor.select_inside_delimiters(&SelectInsideDelimiters, window, cx) + }); + cx.run_until_parked(); + cx.assert_editor_state(after); + } + + // Basic: cursor inside parens selects the contents + assert("foo(ˇbar);", "foo(«barˇ»);", &mut cx); + + // Cursor between commas selects all of the arguments + assert("foo(a, ˇb, c);", "foo(«a, b, cˇ»);", &mut cx); + + // Innermost: nested brackets pick the inner pair + assert("foo([1, ˇ2, 3]);", "foo([«1, 2, 3ˇ»]);", &mut cx); + + // Braces work too + assert("let x = { aˇ: 1 };", "let x = {« a: 1 ˇ»};", &mut cx); + + // Inside a string: selects string content (no quotes) + assert( + "const s = \"hello ˇworld\";", + "const s = \"«hello worldˇ»\";", + &mut cx, + ); + + // Cursor inside string nested in a function call: prefers the string + assert( + "console.log(\"deˇbug\");", + "console.log(\"«debugˇ»\");", + &mut cx, + ); + + // No-op: no surrounding delimiter, selection unchanged + assert("let xˇ = 42;", "let xˇ = 42;", &mut cx); + + // Already a selection inside brackets expands to full content + assert("foo(a, «bˇ», c);", "foo(«a, b, cˇ»);", &mut cx); +} + +#[gpui::test] +async fn test_select_around_delimiters(cx: &mut TestAppContext) { + init_test(cx, |_| {}); + + let mut cx = EditorLspTestContext::new_typescript(Default::default(), cx).await; + + #[track_caller] + fn assert(before: &str, after: &str, cx: &mut EditorLspTestContext) { + let _state_context = cx.set_state(before); + cx.run_until_parked(); + cx.update_editor(|editor, window, cx| { + editor.select_around_delimiters(&SelectAroundDelimiters, window, cx) + }); + cx.run_until_parked(); + cx.assert_editor_state(after); + } + + // Basic: selects parens including the brackets themselves + assert("foo(ˇbar);", "foo«(bar)ˇ»;", &mut cx); + + // Innermost: [] is closer than the outer (), so we select [1, 2, 3] with its brackets + assert("foo([1, ˇ2, 3]);", "foo(«[1, 2, 3]ˇ»);", &mut cx); + + // Braces + assert("let x = {ˇ a: 1 };", "let x = «{ a: 1 }ˇ»;", &mut cx); + + // No-op when not inside any brackets + assert("let xˇ = 42;", "let xˇ = 42;", &mut cx); +} + #[gpui::test] async fn test_move_to_enclosing_bracket_in_markdown_code_block(cx: &mut TestAppContext) { init_test(cx, |_| {}); diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index fa6b9d30b5b712..d99eddd02ee6e6 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -413,6 +413,8 @@ impl EditorElement { register_action(editor, window, Editor::move_to_end_of_larger_syntax_node); register_action(editor, window, Editor::select_enclosing_symbol); register_action(editor, window, Editor::move_to_enclosing_bracket); + register_action(editor, window, Editor::select_inside_delimiters); + register_action(editor, window, Editor::select_around_delimiters); register_action(editor, window, Editor::undo_selection); register_action(editor, window, Editor::redo_selection); if editor.read(cx).buffer_kind(cx) == ItemBufferKind::Multibuffer { From 662c38221f7603330740694701273257fa374285 Mon Sep 17 00:00:00 2001 From: dino Date: Mon, 15 Jun 2026 13:29:52 +0100 Subject: [PATCH 2/4] chore: clean up todo and formatting * The `Editor::hide_mouse_cursor` method is no longer available, so the leftover todo comment was removed. * Wrap the comments above both `SelectInsideDelimiters` and `SelectAroundDelimiters`. --- crates/editor/src/actions.rs | 6 ++++-- crates/editor/src/editor.rs | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/editor/src/actions.rs b/crates/editor/src/actions.rs index 80b03260d761ee..830333706e10db 100644 --- a/crates/editor/src/actions.rs +++ b/crates/editor/src/actions.rs @@ -654,9 +654,11 @@ actions!( MoveToBeginning, /// Moves cursor to the enclosing bracket. MoveToEnclosingBracket, - /// Selects the content inside the nearest enclosing delimiters (brackets, braces, parentheses, or quotes). + /// Selects the content inside the nearest enclosing delimiters + /// (brackets, braces, parentheses, or quotes). SelectInsideDelimiters, - /// Selects the content inside the nearest surrounding delimiters, including the delimiters themselves. + /// Selects the content inside the nearest surrounding delimiters, + /// including the delimiters themselves. SelectAroundDelimiters, /// Moves cursor to the end of the document. MoveToEnd, diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index e741f2244142c0..ee0944374605df 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -7554,8 +7554,6 @@ impl Editor { window: &mut Window, cx: &mut Context, ) { - // TODO: Figure out what happened to `Editor::hide_mouse_cursor`. - // self.hide_mouse_cursor(HideMouseCursorOrigin::MovementAction, cx); self.change_selections(Default::default(), window, cx, |s| { s.move_offsets_with(&mut |snapshot, selection| { // For languages that don't register quotes as bracket pairs in their From 9300add62180a3f083557b790f49a968dc8983ca Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 15 Jun 2026 13:38:53 -0400 Subject: [PATCH 3/4] Fix delimiter selection in Markdown quotes --- crates/editor/src/editor.rs | 19 ----- crates/editor/src/editor_tests.rs | 119 ++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 19 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index d9ecb37d3e6803..1390f564bd9b6f 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -7558,25 +7558,6 @@ impl Editor { ) { self.change_selections(Default::default(), window, cx, |s| { s.move_offsets_with(&mut |snapshot, selection| { - // For languages that don't register quotes as bracket pairs in their - // brackets.scm (notably Markdown inline content), fall back to detecting - // string-like nodes via the syntax tree. - // The same node kinds are used by select_larger_syntax_node. - if !include_brackets { - if let Some((node, node_range)) = - snapshot.syntax_ancestor(selection.start..selection.end) - { - if ["string_content", "inline"].contains(&node.kind()) { - selection.start = node_range.start; - selection.end = node_range.end; - selection.reversed = false; - selection.goal = SelectionGoal::None; - return; - } - } - } - - // Fall back to the nearest bracket pair via tree-sitter. let Some((open, close)) = snapshot .innermost_enclosing_bracket_ranges(selection.start..selection.end, None) else { diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index d096cedacb68ba..0dc11a12e81513 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -38455,6 +38455,16 @@ async fn test_select_inside_delimiters(cx: &mut TestAppContext) { "const s = \"«hello worldˇ»\";", &mut cx, ); + assert( + "const s = \"ˇhello world\";", + "const s = \"«hello worldˇ»\";", + &mut cx, + ); + assert( + "const s = \"hello worldˇ\";", + "const s = \"«hello worldˇ»\";", + &mut cx, + ); // Cursor inside string nested in a function call: prefers the string assert( @@ -38470,6 +38480,72 @@ async fn test_select_inside_delimiters(cx: &mut TestAppContext) { assert("foo(a, «bˇ», c);", "foo(«a, b, cˇ»);", &mut cx); } +#[gpui::test] +async fn test_select_inside_delimiters_in_markdown_quotes(cx: &mut TestAppContext) { + init_test(cx, |_| {}); + + let mut cx = EditorTestContext::new(cx).await; + cx.update_buffer(|buffer, cx| buffer.set_language(Some(markdown_lang()), cx)); + cx.run_until_parked(); + + #[track_caller] + fn assert(before: &str, after: &str, cx: &mut EditorTestContext) { + let _state_context = cx.set_state(before); + cx.run_until_parked(); + cx.update_editor(|editor, window, cx| { + editor.select_inside_delimiters(&SelectInsideDelimiters, window, cx) + }); + cx.run_until_parked(); + cx.assert_editor_state(after); + } + + assert( + r#"This is "ˇhello, world!"."#, + r#"This is "«hello, world!ˇ»"."#, + &mut cx, + ); + assert( + r#"This is "hello, ˇworld!"."#, + r#"This is "«hello, world!ˇ»"."#, + &mut cx, + ); + assert( + r#"This is "hello, world!ˇ"."#, + r#"This is "«hello, world!ˇ»"."#, + &mut cx, + ); + assert( + r#"This is ˇ"hello, world!"."#, + r#"This is "«hello, world!ˇ»"."#, + &mut cx, + ); + assert( + r#"This is "hello, world!"ˇ."#, + r#"This is "«hello, world!ˇ»"."#, + &mut cx, + ); + assert( + r#"This is 'hello, ˇworld!'."#, + r#"This is '«hello, world!ˇ»'."#, + &mut cx, + ); + assert( + r#"This is `hello, ˇworld!`."#, + r#"This is `«hello, world!ˇ»`."#, + &mut cx, + ); + assert( + r#"This is ("hello, ˇworld!")."#, + r#"This is ("«hello, world!ˇ»")."#, + &mut cx, + ); + assert( + r#"This is hello, ˇworld!."#, + r#"This is hello, ˇworld!."#, + &mut cx, + ); +} + #[gpui::test] async fn test_select_around_delimiters(cx: &mut TestAppContext) { init_test(cx, |_| {}); @@ -38496,6 +38572,49 @@ async fn test_select_around_delimiters(cx: &mut TestAppContext) { // Braces assert("let x = {ˇ a: 1 };", "let x = «{ a: 1 }ˇ»;", &mut cx); + // Strings + assert( + "console.log(\"deˇbug\");", + "console.log(«\"debug\"ˇ»);", + &mut cx, + ); + // No-op when not inside any brackets assert("let xˇ = 42;", "let xˇ = 42;", &mut cx); } + +#[gpui::test] +async fn test_select_around_delimiters_in_markdown_quotes(cx: &mut TestAppContext) { + init_test(cx, |_| {}); + + let mut cx = EditorTestContext::new(cx).await; + cx.update_buffer(|buffer, cx| buffer.set_language(Some(markdown_lang()), cx)); + cx.run_until_parked(); + + #[track_caller] + fn assert(before: &str, after: &str, cx: &mut EditorTestContext) { + let _state_context = cx.set_state(before); + cx.run_until_parked(); + cx.update_editor(|editor, window, cx| { + editor.select_around_delimiters(&SelectAroundDelimiters, window, cx) + }); + cx.run_until_parked(); + cx.assert_editor_state(after); + } + + assert( + r#"This is "hello, ˇworld!"."#, + r#"This is «"hello, world!"ˇ»."#, + &mut cx, + ); + assert( + r#"This is 'hello, ˇworld!'."#, + r#"This is «'hello, world!'ˇ»."#, + &mut cx, + ); + assert( + r#"This is `hello, ˇworld!`."#, + r#"This is «`hello, world!`ˇ»."#, + &mut cx, + ); +} From 3ccf2696a3b17089b4d613d3c475380df532d2d7 Mon Sep 17 00:00:00 2001 From: dino Date: Tue, 16 Jun 2026 22:39:06 +0100 Subject: [PATCH 4/4] refactor(editor): simplify tests --- crates/editor/src/editor_tests.rs | 192 ++++++++++++------------------ 1 file changed, 73 insertions(+), 119 deletions(-) diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 0dc11a12e81513..1305a2ad4a0073 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -38420,199 +38420,153 @@ async fn test_toggle_markdown_block_quote(cx: &mut TestAppContext) { "}); } -#[gpui::test] -async fn test_select_inside_delimiters(cx: &mut TestAppContext) { - init_test(cx, |_| {}); - - let mut cx = EditorLspTestContext::new_typescript(Default::default(), cx).await; - - #[track_caller] - fn assert(before: &str, after: &str, cx: &mut EditorLspTestContext) { - let _state_context = cx.set_state(before); - cx.run_until_parked(); - cx.update_editor(|editor, window, cx| { - editor.select_inside_delimiters(&SelectInsideDelimiters, window, cx) - }); - cx.run_until_parked(); - cx.assert_editor_state(after); - } - - // Basic: cursor inside parens selects the contents - assert("foo(ˇbar);", "foo(«barˇ»);", &mut cx); +#[track_caller] +fn assert_select_delimiters(around: bool, before: &str, after: &str, cx: &mut EditorTestContext) { + let _state_context = cx.set_state(before); + cx.run_until_parked(); - // Cursor between commas selects all of the arguments - assert("foo(a, ˇb, c);", "foo(«a, b, cˇ»);", &mut cx); + cx.update_editor(|editor, window, cx| { + if around { + editor.select_around_delimiters(&SelectAroundDelimiters, window, cx); + } else { + editor.select_inside_delimiters(&SelectInsideDelimiters, window, cx); + } + }); - // Innermost: nested brackets pick the inner pair - assert("foo([1, ˇ2, 3]);", "foo([«1, 2, 3ˇ»]);", &mut cx); + cx.run_until_parked(); + cx.assert_editor_state(after); +} - // Braces work too - assert("let x = { aˇ: 1 };", "let x = {« a: 1 ˇ»};", &mut cx); +#[gpui::test] +async fn test_select_delimiters(cx: &mut TestAppContext) { + init_test(cx, |_| {}); + let mut cx = EditorLspTestContext::new_typescript(Default::default(), cx).await; - // Inside a string: selects string content (no quotes) - assert( + // Inside. + assert_select_delimiters(false, "foo(ˇbar);", "foo(«barˇ»);", &mut cx); + assert_select_delimiters(false, "foo(a, ˇb, c);", "foo(«a, b, cˇ»);", &mut cx); + assert_select_delimiters(false, "foo([1, ˇ2, 3]);", "foo([«1, 2, 3ˇ»]);", &mut cx); + assert_select_delimiters(false, "let x = { aˇ: 1 };", "let x = {« a: 1 ˇ»};", &mut cx); + assert_select_delimiters(false, "let xˇ = 42;", "let xˇ = 42;", &mut cx); + assert_select_delimiters(false, "foo(a, «bˇ», c);", "foo(«a, b, cˇ»);", &mut cx); + assert_select_delimiters( + false, "const s = \"hello ˇworld\";", "const s = \"«hello worldˇ»\";", &mut cx, ); - assert( + + assert_select_delimiters( + false, "const s = \"ˇhello world\";", "const s = \"«hello worldˇ»\";", &mut cx, ); - assert( + + assert_select_delimiters( + false, "const s = \"hello worldˇ\";", "const s = \"«hello worldˇ»\";", &mut cx, ); - // Cursor inside string nested in a function call: prefers the string - assert( + assert_select_delimiters( + false, "console.log(\"deˇbug\");", "console.log(\"«debugˇ»\");", &mut cx, ); - // No-op: no surrounding delimiter, selection unchanged - assert("let xˇ = 42;", "let xˇ = 42;", &mut cx); - - // Already a selection inside brackets expands to full content - assert("foo(a, «bˇ», c);", "foo(«a, b, cˇ»);", &mut cx); + // Around. + assert_select_delimiters(true, "foo(ˇbar);", "foo«(bar)ˇ»;", &mut cx); + assert_select_delimiters(true, "foo([1, ˇ2, 3]);", "foo(«[1, 2, 3]ˇ»);", &mut cx); + assert_select_delimiters(true, "let x = {ˇ a: 1 };", "let x = «{ a: 1 }ˇ»;", &mut cx); + assert_select_delimiters(true, "let xˇ = 42;", "let xˇ = 42;", &mut cx); + assert_select_delimiters( + true, + "console.log(\"deˇbug\");", + "console.log(«\"debug\"ˇ»);", + &mut cx, + ); } #[gpui::test] -async fn test_select_inside_delimiters_in_markdown_quotes(cx: &mut TestAppContext) { +async fn test_select_delimiters_in_markdown(cx: &mut TestAppContext) { init_test(cx, |_| {}); - let mut cx = EditorTestContext::new(cx).await; cx.update_buffer(|buffer, cx| buffer.set_language(Some(markdown_lang()), cx)); - cx.run_until_parked(); - - #[track_caller] - fn assert(before: &str, after: &str, cx: &mut EditorTestContext) { - let _state_context = cx.set_state(before); - cx.run_until_parked(); - cx.update_editor(|editor, window, cx| { - editor.select_inside_delimiters(&SelectInsideDelimiters, window, cx) - }); - cx.run_until_parked(); - cx.assert_editor_state(after); - } - assert( + // Inside. + assert_select_delimiters( + false, r#"This is "ˇhello, world!"."#, r#"This is "«hello, world!ˇ»"."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is "hello, ˇworld!"."#, r#"This is "«hello, world!ˇ»"."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is "hello, world!ˇ"."#, r#"This is "«hello, world!ˇ»"."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is ˇ"hello, world!"."#, r#"This is "«hello, world!ˇ»"."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is "hello, world!"ˇ."#, r#"This is "«hello, world!ˇ»"."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is 'hello, ˇworld!'."#, r#"This is '«hello, world!ˇ»'."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is `hello, ˇworld!`."#, r#"This is `«hello, world!ˇ»`."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is ("hello, ˇworld!")."#, r#"This is ("«hello, world!ˇ»")."#, &mut cx, ); - assert( + assert_select_delimiters( + false, r#"This is hello, ˇworld!."#, r#"This is hello, ˇworld!."#, &mut cx, ); -} - -#[gpui::test] -async fn test_select_around_delimiters(cx: &mut TestAppContext) { - init_test(cx, |_| {}); - - let mut cx = EditorLspTestContext::new_typescript(Default::default(), cx).await; - - #[track_caller] - fn assert(before: &str, after: &str, cx: &mut EditorLspTestContext) { - let _state_context = cx.set_state(before); - cx.run_until_parked(); - cx.update_editor(|editor, window, cx| { - editor.select_around_delimiters(&SelectAroundDelimiters, window, cx) - }); - cx.run_until_parked(); - cx.assert_editor_state(after); - } - - // Basic: selects parens including the brackets themselves - assert("foo(ˇbar);", "foo«(bar)ˇ»;", &mut cx); - - // Innermost: [] is closer than the outer (), so we select [1, 2, 3] with its brackets - assert("foo([1, ˇ2, 3]);", "foo(«[1, 2, 3]ˇ»);", &mut cx); - - // Braces - assert("let x = {ˇ a: 1 };", "let x = «{ a: 1 }ˇ»;", &mut cx); - - // Strings - assert( - "console.log(\"deˇbug\");", - "console.log(«\"debug\"ˇ»);", - &mut cx, - ); - - // No-op when not inside any brackets - assert("let xˇ = 42;", "let xˇ = 42;", &mut cx); -} - -#[gpui::test] -async fn test_select_around_delimiters_in_markdown_quotes(cx: &mut TestAppContext) { - init_test(cx, |_| {}); - - let mut cx = EditorTestContext::new(cx).await; - cx.update_buffer(|buffer, cx| buffer.set_language(Some(markdown_lang()), cx)); - cx.run_until_parked(); - #[track_caller] - fn assert(before: &str, after: &str, cx: &mut EditorTestContext) { - let _state_context = cx.set_state(before); - cx.run_until_parked(); - cx.update_editor(|editor, window, cx| { - editor.select_around_delimiters(&SelectAroundDelimiters, window, cx) - }); - cx.run_until_parked(); - cx.assert_editor_state(after); - } - - assert( + // Around. + assert_select_delimiters( + true, r#"This is "hello, ˇworld!"."#, r#"This is «"hello, world!"ˇ»."#, &mut cx, ); - assert( + assert_select_delimiters( + true, r#"This is 'hello, ˇworld!'."#, r#"This is «'hello, world!'ˇ»."#, &mut cx, ); - assert( + assert_select_delimiters( + true, r#"This is `hello, ˇworld!`."#, r#"This is «`hello, world!`ˇ»."#, &mut cx,