Highlight pug while using highlight.js
.
npm install @forwardemail/highlight-pug
const highlightPug = require('@forwardemail/highlight-pug');
// <https://github.com/ztmd/highlight-pug/issues/1>
hljs.registerLanguage('pug', highlightPug);
For experiment, not test fully.
- Doctype
- Inline Comment
- Variable(
#{...}
,${...}
) - Selector(
tag
,id
,class
) - Symbol(
=
,,
,:
,?
,!
)
- Block comment
- Text
- Attribute