New Code!
Markdown has been pushed up to version 0.7.5 by the addition of one new feature and repairing a place where it didn’t match the reference implementation.
The new feature is one of those trivial things I should have done in the first place, but forgot to think about – The text inside []
and ![]
is now
properly escaped, so that naked &’s and <’s won’t make it through to the
outside world. I don’t know how many people will use this, but I’d certainly use &’s all over the place inside webpages and images if I had a way to do it without having to hand-expand special characters to make it work.
Repairing where it didn’t match the reference implementation was a harder, and more importand, thing to do. The reference implementation says that
* item
* item
should expand to
<li><p>item</p></li>
<li><p>item</p></li>
but markdown wasn’t doing that. I had to redo the first-pass of the translator to treat empty lines as paragraph separators instead of as paragraph terminators, then tweak the internal data structures to allow me to force in <p>
as appropriate, which was a few exciting hours of sitting down with pen and paper trying to find the nicest data structure I could use to make it work.
But I did make it work, and so it’s New Code! that people can use. I’m already using it (annotations, since it’s an Open Source ®©™ project, wants to stick as closely to the bleeding edge as possible,) so it’s actually possible it would work for other people as well.
UPDATE: I’ve updated the New Code! since last night, because I wasn’t particularly happy with the way that the contents of
title=
andalt=
were expanding. That’s been changed now, sotitle="Le
Gâteau
Noir!"
now generates a nice floaty “Le Gâteau Noir!” instead of the original garble.If you want the â-mangling code, 0.7 is still out there and ready to mangle your embedded
title=
’s