Skip to content

Commit

Permalink
fix: improved split on whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
gregdan3 committed Jul 15, 2024
1 parent 7f9624a commit eafbf77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function queryRepr(phrases: Phrase[]): string {
}

function countWords(phrase: string): number {
return phrase.split(" ").length;
return phrase.split(/\s+/).length;
// TODO: allow UCSUR to be entered without spaces
}

Expand Down

0 comments on commit eafbf77

Please sign in to comment.