editor: Fix punctuation in JSX tags breaks the linked edit to the closing tag (#30167)
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.
This commit is contained in:
parent
466a53b51e
commit
0d726603ce
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue