Skip to main content

hydration_script_html

Function hydration_script_html 

Source
pub fn hydration_script_html() -> &'static str
Expand description

Returns the <script type="module">…</script> block users should drop into their page shell (usually just before </body>) to hydrate every <pre class="mermaid"> container on the page. The script is safe to include on pages that have no diagrams — it short-circuits when no mermaid container is present.

The return value is a 'static string; embed it verbatim.