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: multiline JSX string conversion to string #167

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

marvinhagemeister
Copy link
Contributor

You learn something new every day! Turns out that contrary to standard JS string literals, JSX strings are allowed to span multiple lines.

<Foo
  description="Register a module with the third party
      registry."
/>

When we convert that to a jsx() call and the values to standard string literals we need to account for this and normalize them back to a valid JS strings.

jsx(Foo, { description="Register a module with the third party registry." });

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM!

@marvinhagemeister marvinhagemeister marked this pull request as ready for review October 25, 2023 15:13
@marvinhagemeister marvinhagemeister merged commit c47b3d0 into main Oct 25, 2023
2 checks passed
@marvinhagemeister marvinhagemeister deleted the fix-multi-string-line branch October 26, 2023 19:37
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.

2 participants