-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Explain behavior for code blocks w/o language tag #642
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
Explain behavior for code blocks w/o language tag #642
Conversation
In issue #641 I was confused that code blocks without language tags were being rendered as a React component, and not a code documentation block. It turned out this was for backward compatibility reasons. This commit updates the documentation to hopefully avoid such confusion in the future. The docs now also suggest a workaround.
Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #642 +/- ##
=======================================
Coverage 96.04% 96.04%
=======================================
Files 101 101
Lines 1339 1339
Branches 271 271
=======================================
Hits 1286 1286
Misses 51 51
Partials 2 2 Continue to review full report at Codecov.
|
So sorry, I should have tested this in the repo I created before I made a PR. Creating blocks using "static" instead of "javascript" just gives an error:
Is there a different way this modifier should be set? I tried digging down in the dependencies to find other documentation but came up short when I reached Github Flavored Markdown and Linguist without finding any references to "static". |
It should be |
Yeah, I’ve missed this too:
sholud be
|
Oh, OK. I need to read the examples more thoroughly it seems. Sorry for the confusion! |
No worries, and if you send another PR, it would be half of a Hacktoberfest t-shirt which is cool ;-) |
* master: Refactor: Replace Markdown links with the Link component instead of the styles (#650) Docs: Clarify logging in Node API (#637) Docs: Correct the `static` modifier note (#643) Docs: Explain behavior for code blocks w/o language tag (#642) Docs: Fix invalid prop type warning (#639) Fix: Clear console on example reload (#638) Docs: Add credits for logo designers (#636) Fix: Update react-docgen (#635) Fix: Correctly print non-Styleguidist exception messages Fix: Fix validation error for uglifyjs-webpack-plugin Docs: Remove react-modal dependency, tweak examples Docs: Update react-styleguidist in CRA example (#632) # Conflicts: # examples/basic/package-lock.json # examples/basic/package.json # examples/cra/package-lock.json # examples/customised/package-lock.json # examples/customised/package.json # examples/express/package-lock.json # examples/express/package.json # examples/sections/package-lock.json # examples/sections/package.json # examples/webpack/package-lock.json # examples/webpack/package.json # package-lock.json # package.json
In issue #641 I was confused that code blocks without language tags were
being rendered as a React component, and not a code documentation block.
It turned out this was for backward compatibility reasons. This commit
updates the documentation to hopefully avoid such confusion in the
future. The docs now also suggest a workaround.