Skip to content

Commit e3dd1dc

Browse files
authored
Update index.js
jsx属性过滤换行符
1 parent f383dfe commit e3dd1dc

File tree

1 file changed

+1
-0
lines changed
  • packages/babel-plugin-transform-vue-jsx/src

1 file changed

+1
-0
lines changed

packages/babel-plugin-transform-vue-jsx/src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ const parseAttributeJSXAttribute = (t, path, attributes, tagName, elementType) =
173173
if (!valuePath.node) {
174174
value = t.booleanLiteral(true)
175175
} else if (t.isStringLiteral(valuePath)) {
176+
valuePath.node.value = valuePath.node.value.replace(/\n\s+/g, ' ')
176177
value = valuePath.node
177178
} else {
178179
/* istanbul ignore else */

0 commit comments

Comments
 (0)