Skip to content

Commit

Permalink
Merge pull request #33479 from c3024/32749-first-letter-lowercase-whe…
Browse files Browse the repository at this point in the history
…n-entering-full-name

show correct name when searching for full name in mentions
  • Loading branch information
deetergp authored Dec 27, 2023
2 parents 4cfb8a2 + 7861516 commit 881a83b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/GetStyledTextArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getStyledTextArray = (name: string, prefix: string): StyledText[] => {
const prefixLocation = name.toLowerCase().search(Str.escapeForRegExp(prefixLowercase));

if (prefixLocation === 0 && prefix.length === name.length) {
texts.push({text: prefixLowercase, isColored: true});
texts.push({text: name, isColored: true});
} else if (prefixLocation === 0 && prefix.length !== name.length) {
texts.push({text: name.slice(0, prefix.length), isColored: true}, {text: name.slice(prefix.length), isColored: false});
} else if (prefixLocation > 0 && prefix.length !== name.length) {
Expand Down

0 comments on commit 881a83b

Please sign in to comment.