Skip to content

Conversation

@johno
Copy link
Member

@johno johno commented Jun 17, 2019

Component names and HTML can be alphanumeric. This
updates the block parsing regex to reflect that.

Closes #593

@vercel
Copy link

vercel bot commented Jun 17, 2019

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

Latest deployment for this branch: https://mdx-git-alphanumeric-names.mdx.now.sh

@chasemccoy
Copy link
Contributor

@johno For what it's worth, I was seeing the issue in #593 without alphanumeric tags.

My code is essentially like this:

<Paragraph bg='red.500' color='white'>Foo...</Paragraph>

And that was rendering as two p tags, one inside the other.

@wooorm
Copy link
Member

wooorm commented Jun 17, 2019

Does this solve the issue? 🤔 h1 is supported in remark as HTML, so maybe it’s something else?

Could a failing/fixed test help?

Note there’s two elements:

[elementOpenExpression, elementCloseExpression, true],
[otherElementOpenExpression, elementCloseExpression, false]

johno added 2 commits July 12, 2019 08:34
Component names and HTML can be alphanumeric. This
updates the block parsing regex to reflect that.

Closes #593
@johno johno force-pushed the alphanumeric-names branch from 4599f97 to 71a58fa Compare July 12, 2019 15:14
@vercel vercel bot temporarily deployed to staging July 12, 2019 15:14 Inactive
@vercel vercel bot temporarily deployed to staging July 12, 2019 15:29 Inactive
@johno
Copy link
Member Author

johno commented Jul 12, 2019

Does this solve the issue? 🤔 h1 is supported in remark as HTML, so maybe it’s something else?

MDX is overriding the remark HTML handling so that we can handle JSX syntax which is more flexible. It now should solve the issue with my latest changes this morning.

Could a failing/fixed test help?

Added a bunch more test cases 💟

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @johno! 🙇

@vercel vercel bot temporarily deployed to staging July 12, 2019 15:44 Inactive
@johno johno merged commit cbcd78c into master Jul 12, 2019
@johno johno deleted the alphanumeric-names branch July 12, 2019 16:04
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.

Headers tags wraps with paragraph

5 participants