diff --git a/packages/cli/src/api/parsers/babel.js b/packages/cli/src/api/parsers/babel.js index 666cf67f..10c3fa61 100644 --- a/packages/cli/src/api/parsers/babel.js +++ b/packages/cli/src/api/parsers/babel.js @@ -74,7 +74,7 @@ function toStr(children, counter = 0) { } else if (child.type === 'JSXText') { // Child is not a React element, append as-is let chunk = child.value; - + const [startMatch] = /^[\s\n]*/.exec(child.value); if (startMatch.includes('\n')) { chunk = chunk.substring(startMatch.length);