Skip to content

Convert array of class names to a string#158

Merged
timneutkens merged 1 commit intomdx-js:masterfrom
devongovett:patch-1
Jun 11, 2018
Merged

Convert array of class names to a string#158
timneutkens merged 1 commit intomdx-js:masterfrom
devongovett:patch-1

Conversation

@devongovett
Copy link
Contributor

For example, when using @mapbox/rehype-prism, the className property is an array instead of a string, which meant the classes were stringified with commas between them instead of spaces.

For example, when using `@mapbox/rehype-prism`, the `className` property is an array instead of a string, which meant the classes were stringified with commas between them instead of spaces.
Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

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

Just verified that this is the expected result of a HAST AST node. So this is the correct solution. Thanks @devongovett!

@timneutkens timneutkens merged commit fd0b3d9 into mdx-js:master Jun 11, 2018
@timneutkens
Copy link
Member

@devongovett actually looking at it again I'm not sure how this works, as we stringify the props right before you repurpose the className property. I'm thinking your newly added logic should be above it to work. Can you make another PR? And lets add an integration test for this 🕵️

@devongovett
Copy link
Contributor Author

ah right I copied and pasted wrong. one sec

@devongovett devongovett deleted the patch-1 branch June 11, 2018 18:24
@devongovett
Copy link
Contributor Author

#159

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.

2 participants