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

Explain behavior for code blocks w/o language tag #642

Merged
merged 1 commit into from
Oct 16, 2017
Merged

Explain behavior for code blocks w/o language tag #642

merged 1 commit into from
Oct 16, 2017

Conversation

wkillerud
Copy link
Contributor

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.

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.
@sapegin sapegin merged commit b0dfbd1 into styleguidist:master Oct 16, 2017
@sapegin
Copy link
Member

sapegin commented Oct 16, 2017

Thanks!

@codecov-io
Copy link

codecov-io commented Oct 16, 2017

Codecov Report

Merging #642 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dba2546...60393a6. Read the comment docs.

@wkillerud
Copy link
Contributor Author

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:

```static

Unknown language: "static"

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".

@sapegin
Copy link
Member

sapegin commented Oct 16, 2017

It should be js static, for example, see examples here: https://react-styleguidist.js.org/examples/basic/

@sapegin
Copy link
Member

sapegin commented Oct 16, 2017

Yeah, I’ve missed this too:

static in place of a language tag

sholud be

static modifier with a language tag

@wkillerud
Copy link
Contributor Author

Oh, OK. I need to read the examples more thoroughly it seems. Sorry for the confusion!

@sapegin
Copy link
Member

sapegin commented Oct 16, 2017

No worries, and if you send another PR, it would be half of a Hacktoberfest t-shirt which is cool ;-)

tizmagik added a commit that referenced this pull request Oct 24, 2017
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants