File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ function toStr(children, counter = 0) {
7373 }
7474 } else if ( child . type === 'JSXText' ) {
7575 // Child is not a React element, append as-is
76- const chunk = child . value . trim ( ) ;
76+ const chunk = child . value . trim ( ) . replace ( / \s + / g , ' ' ) ;
7777 if ( chunk ) { result . push ( chunk ) ; }
7878 } else if (
7979 child . type === 'JSXExpressionContainer'
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export function toStr(children, counter = 0) {
6464 // Child is not a React element, append as-is
6565 /* eslint-disable no-lonely-if */
6666 if ( typeof child === 'string' || child instanceof String ) {
67- const chunk = child . trim ( ) ;
67+ const chunk = child . trim ( ) . replace ( / \s + / g , ' ' ) ;
6868 if ( chunk ) { result . push ( chunk ) ; }
6969 } else {
7070 result . push ( child ) ;
You can’t perform that action at this time.
0 commit comments