React-styleguidist: Code examples with language set to `typescript jsx` does not render the example

Created on 18 Feb 2020  ·  3Comments  ·  Source: styleguidist/react-styleguidist

Current behavior

The code that uses typescript jsx (this is what WebStorm requires to render TypeScript with JSX),

```typescript jsx

doesn't render the example. It only renders the static code block.

Expected behavior

It should render the example.

help wanted

Most helpful comment

All 3 comments

Same with just typescript

I think we should report typescript jsx to WebStorm — looks like they use some unique names, incompatible with other tools. It doesn't work in Visual Studio Code either.

I think typescript and ts don't support JSX, and the correct is tsx.

I think we can support WebStorm custom languages too, look at “Adding aliases”:

Prism.languages.foo = Prism.languages['foo-bar'];

This should work in highlightCode.ts.

Was this page helpful?
0 / 5 - 0 ratings