Skip to content

Styleguidist tries to render code blocks without language tag #641

@wkillerud

Description

@wkillerud

Any code block with a language tag of js, jsx or javascript will be rendered as a React component with an interactive playground

From the documentation it looks like only code blocks with the language tab js, jsx, or javascript should render React components. However React Styleguidist even tries to render code blocks without a language tag.

A workaround is to lie and mark the block as a valid but non-JavaScript/JSX language, for instance Java.

A repo which demonstrates the issue and workaround with a component called Dots: https://github.com/wkillerud/example

I would expect code blocks with no language set to be rendered as a code block and not an interactive version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions