metafates / marky

🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.
https://crates.io/crates/marky
27 stars 2 forks source link

--include-images 'remote' flag not working #3

Closed jessems closed 1 year ago

jessems commented 1 year ago

When I have a markdown file input.md with the following contents:

![](https://fastly.picsum.photos/id/237/536/354.jpg)

And I run the following command:

marky input.md --include-images 'remote'

I get the following error:

thread 'main' panicked at 'Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.', /Users/jmscdch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.26.0/src/runtime/blocking/shutdown.rs:51:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior would be that the image gets downloaded, converted to base64 and embedded in the HTML file.

metafates commented 1 year ago

Sorry, I can't replicate. It works if I try other image. When I try to open yours I get http status 300.

curl 'https://fastly.picsum.photos/id/237/536/354.jpg'
# Invalid parameters

asciicast

jessems commented 1 year ago

My bad, it only throws the error when I use the debug build. When I use the cargo build --release build it works.