mdBook
mdBook copied to clipboard
Support TSX Syntax Highlighting
It would be great if mdbook could support TSX syntax highlighting.
Example:
function test(props) {
const name: string = props.name;
return (
<div className="test">Hello, {name}</div>
);
}
I placed a jsx language tag on a code block, and it seems to highlight fine for me:
Can you say more about what issue you ran into?
Hi,
Thank you. Sorry, my original request was not clear, I should have only said "tsx".
jsx would probably work fine, but the slight difference with tsx that I can think of would be type highlighting.
Here is the same code (generated with mdbook) using:
- jsx
- tsx
- typescript
Note the string type.

any updates?