-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HypertextLiteral.jl + CommonMark.jl = 🤯 #31
Comments
That's awesome. I'm quite surprised that commonmark's HTML handling is actually sufficient to parse |
Regarding including it here, I'd like to remove deps where possible since the eventual end goal is a standard lib. Might be a PlutoUI macro, though whether |
That makes sense! I really hope it becomes a stdlib! I like the idea of including it in PlutoUI. Let's continue testing it to see if there are any unforseen problems, and then release it! |
We will discuss this at the weekly pluto developers call in 1 hour: https://julialang.org/community/#events @MichaelHatherly @jeremiahpslewis feel free to join if you have time! |
https://github.com/MichaelHatherly/CommonMark.jl/blob/master/src/extensions/interpolation.jl#L121-L152 is the set of extensions that get used in |
Thanks for the pointers! I will add those |
FYI I made https://github.com/JuliaPluto/MarkdownLiteral.jl ! I am still wondering what the best name would be, my favourites are:
|
Could go with |
This is great, so much easier to interpolate in latex expressions! |
I'll close this issue now since there isn't much more needed here. |
I made a combination of HypertextLiteral.jl by @clarkevans and CommonMark.jl, and I think it is really cool!!
Screenshots
Features
The list of features is really simple to explain: it is everything that CommonMark gives, plus everything that HypertextLiteral gives! This includes:
@md("""
macro instead ofmd"""
)<script>
to automatically convert to JS literalsDict
orNamedTuple
for thestyle
attribute inside an HTML tagImplementation
Also cool: the code is extremely short!
It is essentially the
@htl
macro for HypertextLiteral.jl, but the result is passed through a CommonMark parser. This works, because:hello *world*
appears exactlyLet me know what you think! Perhaps it can be added to this package as a new macro, or we can make a new package.
The text was updated successfully, but these errors were encountered: