File tree 2 files changed +2
-2
lines changed
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) {
73
73
}
74
74
} else if ( child . type === 'JSXText' ) {
75
75
// Child is not a React element, append as-is
76
- const chunk = child . value . trim ( ) ;
76
+ const chunk = child . value . trim ( ) . replace ( / \s + / g , ' ' ) ;
77
77
if ( chunk ) { result . push ( chunk ) ; }
78
78
} else if (
79
79
child . type === 'JSXExpressionContainer'
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export function toStr(children, counter = 0) {
64
64
// Child is not a React element, append as-is
65
65
/* eslint-disable no-lonely-if */
66
66
if ( typeof child === 'string' || child instanceof String ) {
67
- const chunk = child . trim ( ) ;
67
+ const chunk = child . trim ( ) . replace ( / \s + / g , ' ' ) ;
68
68
if ( chunk ) { result . push ( chunk ) ; }
69
69
} else {
70
70
result . push ( child ) ;
You can’t perform that action at this time.
0 commit comments