Preserve whitespace in JSXExpressionContainer StringLiteral children - fixes T7243

This commit is contained in:
Eric O'Connell
2016-03-24 20:20:15 -07:00
parent 4c371132ae
commit aef82d190b
3 changed files with 7 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ export default function (opts) {
function convertAttribute(node) {
let value = convertAttributeValue(node.value || t.booleanLiteral(true));
if (t.isStringLiteral(value)) {
if (t.isStringLiteral(value) && !t.isJSXExpressionContainer(node.value)) {
value.value = value.value.replace(/\n\s+/g, " ");
}