editor: Fix punctuation in JSX tags breaks the linked edit to the closing tag (#30167)

Smit Barmase created

Closes #29983

While we only care about `.`, just enabling punctuation in case of
linked edits shouldn't hurt.

Release Notes:

- Fixed JSX component names with periods (e.g., <Animated.View>) now
maintain linked edits between opening and closing tags.

Change summary

crates/editor/src/editor.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

crates/editor/src/editor.rs 🔗

@@ -3631,7 +3631,9 @@ impl Editor {
                 let start_anchor = snapshot.anchor_before(selection.start);
 
                 let is_word_char = text.chars().next().map_or(true, |char| {
-                    let classifier = snapshot.char_classifier_at(start_anchor.to_offset(&snapshot));
+                    let classifier = snapshot
+                        .char_classifier_at(start_anchor.to_offset(&snapshot))
+                        .ignore_punctuation(true);
                     classifier.is_word(char)
                 });