Skip to content

Instantly share code, notes, and snippets.

@galaxy001
Last active July 8, 2021 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save galaxy001/15ff2e9a94a6607b2d65f0db2673fd81 to your computer and use it in GitHub Desktop.
Save galaxy001/15ff2e9a94a6607b2d65f0db2673fd81 to your computer and use it in GitHub Desktop.
test

This method doesn't require an internet connection…

  1. base64-encode the <svg> markup (eg. paste svg at base64encode.org)
  2. URL-encode the base64-encoded string (eg. paste base64 string at urlencoder.org)
  3. Put the resulting string in ![alt text](data:image/svg+xml,<paste_your_svg_string_here> "title")

The result would be a string similar to the following that can be inserted into a Jupyter Notebook Markdown cell…

svg image


1)png tester1
2)png tester2

1) the referenced base64 block stops being parsed right at the point where 'a new chunk of image' starts, the green part ... So4Z4wxkXa7KukmKul2dDvd ...
2) by passing the block directly we get the whole image

This was tested with http://tmpvar.com/markdown.html. I don't know how it behaves on github. The issue has been already well discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment