From fa2096da39555972875f1e2dec78316ba99b0176 Mon Sep 17 00:00:00 2001 From: Henk Verlinde Date: Thu, 1 Jul 2021 16:37:59 +0200 Subject: [PATCH] feat: update mermaid code fences usage --- assets/js/highlight.js | 2 +- content/docs/prologue/quick-start.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/js/highlight.js b/assets/js/highlight.js index 00a2a2d..c96b781 100644 --- a/assets/js/highlight.js +++ b/assets/js/highlight.js @@ -18,7 +18,7 @@ hljs.registerLanguage('yaml', yaml); hljs.registerLanguage('md', markdown); document.addEventListener('DOMContentLoaded', () => { - document.querySelectorAll('pre code').forEach((block) => { + document.querySelectorAll('pre code:not(.language-mermaid)').forEach((block) => { hljs.highlightElement(block); }); }); diff --git a/content/docs/prologue/quick-start.md b/content/docs/prologue/quick-start.md index 74f27af..bfe331b 100644 --- a/content/docs/prologue/quick-start.md +++ b/content/docs/prologue/quick-start.md @@ -13,6 +13,12 @@ weight: 110 toc: true --- +```js +function myFunction(p1, p2) { + return p1 * p2; // The function returns the product of p1 and p2 +} +``` + ## Flow ### Shortcode