Skip to content

Commit

Permalink
fix(new-line): add newline fix even to other methods
Browse files Browse the repository at this point in the history
  • Loading branch information
emish89 committed Oct 24, 2023
1 parent 321908b commit de48ea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ export const keysStartingWith = (obj: { [key: string]: string }, start: string)
Object.keys(obj).filter((key) => key.startsWith(start));

export const checkTextWithAutoSuggestions = (text: string) => {
const words = text && text.split(' ');
const words = text && text.trimStart().split(' ');
const newText: string[] = [];
if (words) {
words.forEach((word) => {
Expand All @@ -2110,7 +2110,7 @@ export const checkTextWithAutoSuggestions = (text: string) => {
export const fromUnicodeToEmoji = (text: string) => String.fromCodePoint(parseInt(text, 16));

export const checkTextWithAutoSuggestionsAndUnicode = (text: string) => {
const words = text && text.split(' ');
const words = text && text.trimStart().split(' ');
const newText: string[] = [];
if (words) {
words.forEach((word) => {
Expand Down

0 comments on commit de48ea8

Please sign in to comment.