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

Blank line in MDX (inside prop) is not supported #12409

Closed
cprecioso opened this issue Mar 7, 2022 · 2 comments
Closed

Blank line in MDX (inside prop) is not supported #12409

cprecioso opened this issue Mar 7, 2022 · 2 comments
Labels
lang:mdx Issues affecting the MDX extension to Markdown (not general Markdown issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:awaiting response Issues that require answers to questions from maintainers before action can be taken status:needs investigation Issues that need additional investigation, e.g. to understand whether the reported behavior is a bug

Comments

@cprecioso
Copy link

cprecioso commented Mar 7, 2022

Prettier 2.5.1
Playground link

--parser mdx

Input:

<Foo bar={{

  }}>
</Foo>

Take note that the blank line is indeed empty, a blank line that contains indentation will not throw the error.

Output:

SyntaxError: Unexpected token (1:15)
> 1 | <$><Foo bar={{</$>
    |               ^

Expected behavior:

<Foo bar={{}}></Foo>
@kachkaev
Copy link
Member

kachkaev commented Mar 8, 2022

👋 @cprecioso! Can you give an example of a parser where this MDX is valid? A link to a spec would also be great. This issue might be related to #12209, but I’m not 100% sure if empty lines like that are meant to be supported.

@kachkaev kachkaev added lang:mdx Issues affecting the MDX extension to Markdown (not general Markdown issues) status:awaiting response Issues that require answers to questions from maintainers before action can be taken status:needs investigation Issues that need additional investigation, e.g. to understand whether the reported behavior is a bug labels Mar 8, 2022
@no-response
Copy link

no-response bot commented Mar 22, 2022

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Mar 22, 2022
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jun 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:mdx Issues affecting the MDX extension to Markdown (not general Markdown issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:awaiting response Issues that require answers to questions from maintainers before action can be taken status:needs investigation Issues that need additional investigation, e.g. to understand whether the reported behavior is a bug
Projects
None yet
Development

No branches or pull requests

2 participants