-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 markdown stories #464
Fix markdown stories #464
Conversation
.map(parseBlockAttrs) | ||
.filter(({block}) => block.story !== "false") | ||
.map(node => { | ||
return nodeToStory(node, path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: could technically be on the same line
.map(node => nodeToStory(node, path))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, good catch. Pretty sure I was doing something else in this function earlier. 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left more of a note for future selves, but I'm cool with this if it works 👍
loader: 'raw-loader', | ||
}) | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if this is common practice in webpack config, but I would feel better if eventually we used the standard loaders, maybe enhancing with extra webpack stuff. 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's definitely a hack!
Fixes #463. This commit hosed our markdown parsing by adding a markdown preprocessor to Storybook, which prevented us from parsing the markdown files as raw markdown.
Also, single quotes are better than double?
/cc @primer/ds-core