Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
hj940709 committed Mar 21, 2024
1 parent a12bca0 commit 0f63f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/components/GridHexagon/GridText.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class GridText extends Component {
remaining_string = temp.slice(1, temp.length ).join(' ')
}*/
while((remaining_string.includes(' ') || remaining_string.includes('\n')) && remaining_string.length >= 18){
const temp = remaining_string.split(/['\s', '\n']/)
const temp = remaining_string.split(/['\s', '\n']/).map(string => string.trim()).filter(string => string.length > 0)
if (temp[0].length < 3 ) {
splitted_string.push(temp.slice(0, 2).join(' '))
remaining_string = temp.slice(2, temp.length).join(' ')
Expand Down

0 comments on commit 0f63f11

Please sign in to comment.