Skip to content

Conversation

2096903746
Copy link

  render (h) {
      return (
        <div style='
                line-height: 16px;
                text-align: left;
              '>
              </div>
    )}

以上jsx如果不过滤换行符,会报错: Unterminated string constant

在老版本jsx插件中, 是会过滤掉属性中的换行符,老版本参考:
[ babel-plugin-transform-vue-jsx
/index.js](https://github.com/vuejs/babel-plugin-transform-vue-jsx/blob/6ad7487579094cc188d470171af8f62335193896/index.js#L207)

jsx属性过滤换行符
@netlify
Copy link

netlify bot commented Jul 4, 2023

Deploy Preview for jsx-vue2-playground ready!

Name Link
🔨 Latest commit e3dd1dc
🔍 Latest deploy log https://app.netlify.com/sites/jsx-vue2-playground/deploys/64a400b7fd1cb90008f0ec1d
😎 Deploy Preview https://deploy-preview-308--jsx-vue2-playground.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant