Closed cbergmann closed 3 years ago
Hey @cbergmann
Thanks for your contribution!
Ideally, I think we should create an Image
node and let Asciidoctor converts it to HTML but this is a really good first step 👌🏻
Could you please add a test in https://github.com/Mogztter/asciidoctor-emoji/blob/master/test/test.js?
@cbergmann Let me know if you need guidance for writing a test
@Mogztter This is my first try on the test but I could not get the convert function to act like calling the cli with ' --attribute data-uri --attribute allow-uri-read'. Do you have an Idea?
I think this relevant part of the documentation but it does not work.
This is my first try on the test but I could not get the convert function to act like calling the cli with ' --attribute data-uri --attribute allow-uri-read'. Do you have an Idea?
@cbergmann By default, the API is running in SECURE mode where data-uri
is disabled (for security reasons). I've added safe: 'safe'
and now the test is passing 🎉
This is a workaround for #10. This solution gives fully offline emojis with little additional code. When using one emoji multiple times this would increase the size of the overall result compared to a "download and cache" solution.