feat: diagram rendering + post-processor (wip)
This commit is contained in:
1 parent
5f99b30024
commit
52d0af19b4
4 files changed
+24
-2
No files matched your search
@@ -27,7 +27,11 @@ module.exports = {
|
||||
typographer: this.config.typographer,
|
||||
quotes: _.get(quoteStyles, this.config.quotes, quoteStyles.English),
|
||||
highlight(str, lang) {
|
||||
return `<pre><code class="language-${lang}">${_.escape(str)}</code></pre>`
|
||||
if (lang === 'diagram') {
|
||||
return `<pre class="diagram">` + Buffer.from(str, 'base64').toString() + `</pre>`
|
||||
} else {
|
||||
return `<pre><code class="language-${lang}">${_.escape(str)}</code></pre>`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user