# This Space for Rent

### New Code!

After a period of almost a year, Discount has been nudged up to version 2.2.0 with a whole huge pile of changes, which are (mainly?):

• mathjax support (–with-latex) ($$..$$, $$..$$, and $..$, not $..$))
• make the amalloc() paranoia malloc library even more paranoid by putting markers at the start and the end of each allocated block.
• Redo comment block handling; standard markdown only treats comments as block html if the start comment marker starts at the beginning of a line and the end comment marker is at the end of a line.
• clean up broken and insufficiently paranoid parts of configure.inc
• When attempting to match the closing tag of an html block, don’t advance the match index unless that character actually matches. (defect: <p></>* was splitting into 2 lines when it should have generated <p><p></>*</p>)
• if mkd_compile() is called multiple times, actually recompile the document if the flags change.
• When processing automatic links, explicitly allow extended utf-8 characters as part of the url.
• Tweak configure.inc to quote __cwd & __d so that a \$__cwd with spaces in the path won’t make configure.sh (or make install) puke
• messed up the fwrite() error check in mkd_generatehtml,
• return EOF instead of -1 on error in mkd_xhtmlpage,
• if the mkd output fails, exit with nonzero status
• Handle error conditions and pass errorcodes out of various mkd_xxx output functions (inspired by a patch written by Koen Punt)
• in mkd_document() don’t pad the generated html with a 0 unless it’s actually generated.
• If the C compiler generates .dSYM directories, get rid of them during distclean
• Change the configure.sh message for the –with-(foo) variables to reflect what it’s actually doing with them.
• Theme really wants the old behavior of –with-(foo), so pass those settings into theme in a #define
• Have configure.sh just state that an option is not supported instead of dying.
• Convert many configure-time settings to runtime flags
• Manpage editing by Nathan Phillip Brink
• Update plan9 support.

I’ve been running this weblog withl all of these tweaks, and it has survived without any mysterious datacenter-destroying explosions (though the FreeBSD vhosting service I was running on went belly-up last month and forced a switch to a linux vhost; I did have the option of another freebsd vhost, but freebsd is chasing Linux down into the cavern of tweaking things for the sake of tweaking things, and if I’m going to have to deal with the Unix equivalent of mystery meat I’ll choose one with a package management system that isn’t as horribly stupid as ports turned out to be) so there’s actually a good chance that you can update your discount libraries and not end up sobbing piteously as everything software related on your server disintegrates.