Describe the bug
After upgrading to 5.0.0, addon-info does not render any code snippets given via the text
key on the info
parameter on the addParameter()
function. It successfully displays all the given text but fails and does not display the given code under the ~ ~ notation, i.e:
~~js
\
function something(a) {
return a;
}
\~
~
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The supposed code snippet should show correctly as before
Screenshots
Code snippets
System:
Additional context
none
I am also experiencing this with the triple ` syntax.
I see this issue when using individual story parameters as well.
This needs to be merged ASAP.
I also would appreciate that fix to be released
Here are some clues I found:
This line should maybe changed to:
const Code = (props) => {
const { language, code } = props
return (
<SyntaxHighlighter
bordered
copyable
language={language}
>
{code}
</SyntaxHighlighter>
);
};
But then this line (and other lines will probably too) results in:
Cannot read property 'bar' of undefined
Which tells me components consuming the theme aren't up to date with the latest themes found here.
May anyone pick it up from here?
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Is there any motion on this issue? Still seeing it in 5.0.10 this morning.
Yes the issue still exists..
For the sake of helping to weight this issue and keep it fresh:
Having the same issue upgrading from storybook 4 to 5.
I even tried the markdown example from the README and it is also not working.
https://github.com/storybooks/storybook/tree/master/addons/info#markdown
Hi all, still no news about this issue? It would be great to have it fixed...
Fix this plx!
This is a rather urgent problem that I feel deserves more attention, so bumping a bit.
There is a relatively easy workaround in this linked issue:
@whengely Just be nice if it supported the syntax laid out in the documentation. The same syntax this addon supported prior.
bump
Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-alpha.29 containing PR #6016 that references this issue. Upgrade today to try it out!
You can find this prerelease on the @debug
NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Most helpful comment
This needs to be merged ASAP.