training icon indicating copy to clipboard operation
training copied to clipboard

Add support for jsx-lexer

Open stevepiercy opened this issue 7 years ago • 5 comments

We've got at least three trainings that could use jsx as a lexer via jsx-lexer. This lexer works with other themes, but not the RTD theme.

See https://github.com/plone/training/pull/341#issuecomment-434638732

I have no idea whether it is possible to customize the RTD theme for lexers not included with Pygments.

stevepiercy avatar Oct 31 '18 10:10 stevepiercy

+1 also we need to add a less lexer too!

@svx do you think it's possible?

sneridagh avatar Sep 28 '19 11:09 sneridagh

I just ran a test, and it appears that both the default and RTD themes lack sufficient styling to make jsx-lexer useful. But there is an open PR upstream in Pygments

stevepiercy avatar Sep 28 '19 11:09 stevepiercy

We now have a JSX, LESS, and SCSS lexers with the new theme. However, the JSX is not that great. We might need to use JS or plain old text.

stevepiercy avatar Sep 11 '21 01:09 stevepiercy

When writing JSX code, avoid using ' in HTML tags. The lexer barfs on it.

stevepiercy avatar Feb 06 '22 11:02 stevepiercy

See https://github.com/fcurella/jsx-lexer/issues/15

stevepiercy avatar Feb 06 '22 11:02 stevepiercy