Prism
Prism can be used to highlight code in your HTML. It will automatically be included when you do the following:
-
Wrap your code in a pre tag with the data-mt-code="true" and
data-mt-code-lang="language"
attributes.
Things to be aware of
- You need to use html entities for characters that is included in html. For instance use < for <
- It is sensitive to tabs and spaces. If you struggle with prettier formatting it in a way that messes things
up, you can enter <!-- prettier-ignore --> before the pre tag, and prettier won't format the inside of
pre tag.
Example
<pre data-mt-code="true" data-mt-code-lang="html">
Supported languages
List of supported languages.