mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
@@ -699,7 +699,7 @@ fn first_is_desired_char(
|
|||||||
new_text_index: usize,
|
new_text_index: usize,
|
||||||
desired: char,
|
desired: char,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
new_text.chars().next().map_or(false, |c| {
|
new_text.chars().next().is_some_and(|c| {
|
||||||
c == desired
|
c == desired
|
||||||
&& (new_text_index == 0 || full_text.chars().nth(new_text_index - 1) == Some(' '))
|
&& (new_text_index == 0 || full_text.chars().nth(new_text_index - 1) == Some(' '))
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user