Skip to content
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

fix(es/transform/react): Allow multiple JSX pragmas in single Comment #2561

Merged
merged 5 commits into from
Oct 30, 2021

Conversation

hlubek
Copy link
Contributor

@hlubek hlubek commented Oct 27, 2021

Fixes #2560

This is my very first piece of Rust, so I hope it makes some sense.
The idea is to split each comment line by any amount of whitespace and process pairs of a directive and value (Babel does this by using regexps).

I wanted to include a test assertion to check for the correct res.runtime etc. options being set - but I couldn't figure that out using the test! macro.

@CLAassistant
Copy link

CLAassistant commented Oct 27, 2021

CLA assistant check
All committers have signed the CLA.

@kdy1 kdy1 added this to the v1.2.106 milestone Oct 28, 2021
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

ecmascript/transforms/react/src/jsx/mod.rs Show resolved Hide resolved
ecmascript/transforms/react/src/jsx/tests.rs Outdated Show resolved Hide resolved
@kdy1 kdy1 changed the title fix(es/transform/react): Multiple JSX pragmas fix(es/transform/react): Allow multiple JSX pragma in single Comment Oct 30, 2021
@kdy1 kdy1 changed the title fix(es/transform/react): Allow multiple JSX pragma in single Comment fix(es/transform/react): Allow multiple JSX pragmas in single Comment Oct 30, 2021
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kdy1 kdy1 merged commit 3f5c826 into swc-project:master Oct 30, 2021
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Panic for multiple JSX pragmas (MDX v2)
3 participants