Open kopax opened 5 years ago
Hi there,
This one's definitely not a bug. Markdown code highlighting blocks with javascript
work perfectly fine as Markdown, react-styleguidist's unique interpretation is, well, not something for which documentation.js is responsible.
Assuming you're running documentationjs in a script, maybe try replacing ```javascript with your preferred code block language with a find & replace tool, like sed?
@tmcw I am currently trying to find the proper solution for my users.
I am in the context of a package bundler boilerplate, and I do not know how the documentation will be written.
I've decided to follow your advice to use sed.
I'd like also to avoid generating the doc that are react components with documentationjs.
Isn't it possible to --exclude some pattern (like **/{components,containers}/**
or `/[A-Z]/*)
Is that possible?
I still have a draw back if I use sed.... and it is a bit annoying. We cannot use --watch
and rebuild our documentation in live. Is there anything you could help with that?
You should be able to do it with updateExample function:
https://react-styleguidist.js.org/docs/configuration#updateexample
Thank you @sapegin, that was exactly what I was looking for. I've been through your documentation quite a few time and never saw this. Good catch
I am reopening this.
So far we have found documentationjs good at generating our JSdoc, we want to be able to specify the lang used for the highlight.
In some case, we are showing node environment and providing a sandbox is something we might turn off by default.
I know this is related to react-styleguidist @sapegin, so far I am not sure where should I add this behavior, if it's in both and if it has to be a fork. Any recommendation on how to proceed and improve the overall experience?
Best regards
Hi all, I have just tested documentjs and it work great.
The author of react-styleguidist recommended documentationjs after someone asked a question https://github.com/styleguidist/react-styleguidist/issues/445#issuecomment-302117671
I have issue with the generated markdown in the context of https://github.com/styleguidist/react-styleguidist
Type
Reproduction
Generate a JSdoc for a function with
@example
and generate the markdown such as :The result look like
react-styleguidist recognize the
\```javascript
instead of the recommended\```js static
for static example. Because of that, it try to render the js inside and this will break the documentation.For static code highlight they recommend to use
js static
instead ofjavascript
.Is there a way to change the highlight language?
9.0.0-alpha.1