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(v2): metadata error if markdown does not have ending line #2095

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Dec 6, 2019

Motivation

If markdown file does not have an ending line, the metadata embed in content will error out due to MDX mistaking export const metadata as part of paragraph

Example:
This won't error
image

Error
image

So whats happening under the hood ?
1  error if got no linebreak

The metadata is mistaken as part of paragraph
2  whats happening is that metadata is thought as paragraph

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

No more error
3  correct export

Related PRs

#2088

@endiliey endiliey added the pr: bug fix This PR fixes a bug in a past release. label Dec 6, 2019
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 6, 2019
@yangshun
Copy link
Contributor

yangshun commented Dec 6, 2019

MDX...

@yangshun yangshun merged commit c45a2c6 into master Dec 6, 2019
@endiliey
Copy link
Contributor Author

endiliey commented Dec 6, 2019

My bad.. I should've been more careful and take this into account. Glad I find this out in my blog

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 4a10087

https://deploy-preview-2095--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 4a10087

https://deploy-preview-2095--docusaurus-preview.netlify.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants