Skip to content

Instantly share code, notes, and snippets.

@snipsnipsnip
Last active October 7, 2025 00:27
Show Gist options
  • Save snipsnipsnip/df4a2b393c589316cfd1f4348b46e66f to your computer and use it in GitHub Desktop.
Save snipsnipsnip/df4a2b393c589316cfd1f4348b46e66f to your computer and use it in GitHub Desktop.
typedoc-custom.cjs applies mermaid to markdown files included as projectDocuments which somehow don't work well with typedoc-plugin-mermaid
"use strict";
let nodes = document.querySelectorAll('code.mermaid');
let maybe = nodes.length === 0 ? null : import('https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs');
maybe?.then(({ default: mermaid }) => mermaid.run({ nodes }));
// SPDX-License-Identifier: CC0-1.0
// https://github.com/snipsnipsnip/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment