feat: update mermaid code fences usage

This commit is contained in:
Henk Verlinde 2021-07-01 16:37:59 +02:00
parent 7d6df42519
commit fa2096da39
2 changed files with 7 additions and 1 deletions

View File

@ -18,7 +18,7 @@ hljs.registerLanguage('yaml', yaml);
hljs.registerLanguage('md', markdown); hljs.registerLanguage('md', markdown);
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('pre code').forEach((block) => { document.querySelectorAll('pre code:not(.language-mermaid)').forEach((block) => {
hljs.highlightElement(block); hljs.highlightElement(block);
}); });
}); });

View File

@ -13,6 +13,12 @@ weight: 110
toc: true toc: true
--- ---
```js
function myFunction(p1, p2) {
return p1 * p2; // The function returns the product of p1 and p2
}
```
## Flow ## Flow
### Shortcode ### Shortcode