-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline class output fix #598
Conversation
✅ Deploy Preview for vue-jsx-explorer ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@Amour1688 cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const App = () => (
<div
hello="a b"
>
Hello World
</div>
)
It should be hello: "a b"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use the same logic in transformJSXText
from utils.ts
.
if (attributeValue?.type === 'StringLiteral') { | ||
attributeValue.value = attributeValue.value | ||
.trim() | ||
.replace(/r?\n|\r/g, ''); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we can remove redundant spaces after \n
. For example https://babeljs.io/repl#?browsers=&build=&builtIns=false&corejs=3.21&spec=false&loose=false&code_lz=MYewdgzgLgBAggBwTAvDAFASlQPgwKBhgB4ATASwDdCiYALAUwBsmQUAiAQxqICN2aAehz5MQA&debug=false&forceAllTransforms=false&modules=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=react&prettier=false&targets=&version=7.22.5&externalPlugins=&assumptions=%7B%7D
Thanks for the PR. We can directly use |
🤔 What is the nature of this change?
🔗 Related Issue
💡 Background or solution
📝 Changelog
☑️ Self Check before Merge