diff options
author | ache <ache@ache.one> | 2018-04-14 04:14:43 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2018-04-14 04:14:43 +0200 |
commit | b6b66b9fe10a82b44884be3e27941bd6ab020715 (patch) | |
tree | c3febfb083173d364aedcf8e1079fb3961fec595 /tohtml.js | |
parent | Style enhancement (diff) |
Ajout de remark-custom-blocks
Diffstat (limited to 'tohtml.js')
-rw-r--r-- | tohtml.js | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -20,6 +20,7 @@ const rehypeKatex = require('rehype-katex'); const rehypeStringify = require('rehype-stringify'); const unified = require('unified'); const remark = require('remark-parse'); +const customBlocks = require('remark-custom-blocks'); function toHTML(data, fnc) { @@ -32,6 +33,29 @@ function toHTML(data, fnc) { .use(math) .use(kbd) .use(sb) + .use(customBlocks, { + information: { + classes: 'special-box information', + title: 'optional' + }, + comment: { + classes: 'special-box comment', + title: 'optional' + }, + attention: { + classes: 'special-box attention', + title: 'optional' + }, + question: { + classes: 'special-box question', + title: 'optional' + }, + good: { + classes: 'special-box good', + }, + bad: { + classes: 'special-box bad', + }}) .use(highlight) .use(html, {allowDangerousHTML: true}) .use(rehypeKatex) |