mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.35k stars 227 forks source link

Add an option to prepend a URL to img #551

Open erichiller opened 1 year ago

erichiller commented 1 year ago

For Markdown output files that are hosted remotely, I've had situations where I can't use relative URLs for the img src. My request is for an extra option input for prependUrl or similar for a base URL that the img src tag in the output Markdown would point to.

I believe it should be easy enough, this line is where it would be input as far as I can tell.

https://github.com/mermaid-js/mermaid-cli/blob/master/src/index.js#L436

A post-processing regex pass is what I'm doing temporarily, but there's always chance that there is a conflict.