mirror of
https://github.com/tomfran/typo.git
synced 2025-04-25 21:19:55 +03:00
parent
157ca6fdb0
commit
8def1b3e59
2 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
<pre class="mermaid">
|
||||
{{- .Inner | safeHTML }}
|
||||
{{- .Inner | htmlEscape | safeHTML }}
|
||||
</pre>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
||||
|
|
|
@ -2,6 +2,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
const codeBlocks = document.querySelectorAll("pre");
|
||||
|
||||
codeBlocks.forEach((codeBlock) => {
|
||||
if (codeBlock.className == "mermaid") return;
|
||||
const copyButton = document.createElement("button");
|
||||
copyButton.className = "copy-code-button";
|
||||
copyButton.textContent = "copy";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue