jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
191 stars 62 forks source link

Display base64 SVG #855

Open ash-ashra opened 8 months ago

ash-ashra commented 8 months ago

Hii @rowanc1,

I'd like to render base64 encoded SVGs in mystsmd sandbox. Although it works with jpeg similar to Colab, the SVG did not. Here's a Colab notebook where I tested an SVG code that works in Colab but not in Mysmd: https://colab.research.google.com/drive/1it7E_0p0jEhjjooL-lE9esoDioWtwJ9g

Meantime, please let me know if there are any work around?

Cheers, Arash

welcome[bot] commented 8 months ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

rowanc1 commented 8 months ago

Thanks @ashra-academy. It looks like this is disabled specifically in markdown-it:

https://github.com/markdown-it/markdown-it/issues/941

We can override the validateLink function in the tokenizer, probably in this function:

https://github.com/executablebooks/mystjs/blob/main/packages/myst-parser/src/myst.ts#L60

ash-ashra commented 8 months ago

Thaanks. Looking forward to the new release then.