Merge of features tied to 'Trinidad Scorpion' funding goal

This commit is contained in:
squidfunk
2022-06-02 17:20:33 +02:00
parent a3f457ecb1
commit e2556d84d6
89 changed files with 13701 additions and 290 deletions

View File

@@ -54,9 +54,9 @@ export interface Mermaid {}
let mermaid$: Observable<void>
/**
* Global index for Mermaid integration
* Global sequence number for diagrams
*/
let index = 0
let sequence = 0
/* ----------------------------------------------------------------------------
* Helper functions
@@ -101,7 +101,7 @@ export function mountMermaid(
/* Render diagram */
mermaid$.subscribe(() => {
el.classList.add("mermaid") // Hack: mitigate https://bit.ly/3CiN6Du
const id = `__mermaid_${index++}`
const id = `__mermaid_${sequence++}`
const host = h("div", { class: "mermaid" })
mermaid.mermaidAPI.render(id, el.textContent, (svg: string) => {