Closed ryyppy closed 5 years ago
This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push.
Latest deployment for this branch: https://reasonmlorg-git-syntax-highlighting.reason-association.now.sh
Adds syntax highlighting via highlight.js.
This uses the
hljs.highlight
function inside theText.Code
component, which will work perfectly fine with NextJS' SSR.Also right now, all code fences without a language will be highlighted as
reason
code by default. We can change that as soon as every code fence has a tagged language, but for now I recommend handling it like this.