DEV Community

loading...

lightweight syntax highlighter for javascript (for blogger)

programmerabhi profile image programmerabhi ・1 min read

Let someone have a lightweight code highlighter. The one that has been claimed that it is lightweight (Prism, Highlight, w3c, etc). I have tried all, there is no lightweight. If you have made your own or are in the project, please share if possible

Discussion

pic
Editor guide
Collapse
benstigsen profile image
Benjamin Stigsen

I kind of made my own that I'd consider easy to expand and change. It's vanilla JS, but it doesn't include any documentation. Things that get highlighted are determined with regex. It allows you to highlight individual codeblocks or all code blocks at once. It is also compatible with highlightJS conversions and markdown converted codeblocks.
github.com/BenStigsen/jSyntax/blob...