mersinvald / aquamarine

Inline diagrams for rustdoc with mermaid.js
MIT License
487 stars 25 forks source link

fetching remote mermaid.js #27

Closed frehberg closed 1 year ago

frehberg commented 1 year ago

The generated html document contains primary and secondary source of mermaid.js (see below), but as the mermaid.js is not present in folder target/doc/{CRATENAME}, the secondary remote source is used always.

The doc files should not fetch JS code from remote. To solve the issue the aquamarine macro-processor should copy an embedded mermaid.js into the folder target/doc/{CRATENAME}

<script src="../mermaid.min.js"></script>

<script>window.mermaid || document.write('<script src="https://unpkg.com/mermaid@9.1.5/dist/mermaid.min.js" crossorigin="anonymous"><\/script>')</script>
frehberg commented 1 year ago

Fixing:

frehberg commented 1 year ago

Ping? Any comments? Is the patch not suitable? Would you like a change?

mersinvald commented 1 year ago

Fixed in #29

Thank you, @frehberg, sorry for the delay on my part