Code-golfing riki's HTML templating engine in Julia
12 points by otde
12 points by otde
Cool! I found the raw Julia comments a bit hard to read, so I put the code in a Pluto.jl notebook which you can read here.
Btw, running it like this caught a small bug in the original renderhtml definition, which is that the IOBuffer() method with no arguments creates a read-write buffer, but the IOBuffer(string::String) method creates a read-only buffer.
I kind of like it.
And with Julia, the answer is always “very” :)
Nice. Maybe you would enjoy the challenge of doing escaping differently for attributes and text. And maybe also specialising it for script and style tags.