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

Property adjustments for "style", "aria-*" and "data-*" #261

Merged
merged 2 commits into from Sep 19, 2018
Merged

Property adjustments for "style", "aria-*" and "data-*" #261

merged 2 commits into from Sep 19, 2018

Conversation

silvenon
Copy link
Contributor

Some plugins like rehype-katex add properties like style and aria-hidden, which need to be adjusted for JSX. This commit introduces the following changes:

  • style strings now turn into camelized objects
  • aria-* and data-* properties now have keys in param-case

After these changes I can run the example in #145, but I have only tried with React, not Preact. However, the issue that this solves isn't the from the OP, but rather #145 (comment).

@vercel
Copy link

vercel bot commented Sep 17, 2018

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Some plugins like rehype-katex add properties like "style" and
"aria-hidden", which need to be adjusted for JSX. This commit introduces
the following changes:

- style strings now turn into camelized objects
- aria-* and data-* properties now have keys in param-case

Fixes #145.
@linonetwo
Copy link

Seems to have errors in SSR?

Copy link
Member

@johno johno left a comment

Choose a reason for hiding this comment

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

🥇

@silvenon
Copy link
Contributor Author

@linonetwo could you be more specific?

@silvenon
Copy link
Contributor Author

I set the testing environment for mdx package to node and tests still pass. If you were referring to now deployment, that failure is unrelated to this PR.

@silvenon silvenon merged commit 52c3977 into mdx-js:master Sep 19, 2018
@silvenon silvenon deleted the hast-to-jsx-adjustments branch September 19, 2018 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants