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

Newlines in MDX result in error #9929

Closed
gsklee opened this issue Feb 22, 2020 · 1 comment
Closed

Newlines in MDX result in error #9929

gsklee opened this issue Feb 22, 2020 · 1 comment

Comments

@gsklee
Copy link

gsklee commented Feb 22, 2020

In my MDX story if I write:

<Preview>
  <Story name="basicA">
    <Button>Label</Button>
  </Story>
  <Story name="basicB">
    <Button>Label</Button>
  </Story>
  <Story name="basicC">
    <Button>Label</Button>
  </Story>
</Preview>

then everything is good. But if I write

<Preview>
  <Story name="basicA">
    <Button>Label</Button>
  </Story>

  <Story name="basicB">
    <Button>Label</Button>
  </Story>

  <Story name="basicC">
    <Button>Label</Button>
  </Story>
</Preview>

then Storybook will give this error:

Module build failed (from ./node_modules/@mdx-js/loader/index.js):
SyntaxError: Unexpected token (4:10)
    at Object.raise (...)

I have a play around MDX's playground and this doesn't seem to happen there so I am assuming it's a Storybook issue.

@shilman
Copy link
Member

shilman commented Feb 22, 2020

closing as dupe to #7902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants