This Space for Rent

New Code (again)!

Discount has been shoved up to version 2.2.4 with a small collection of bugfixes, feature enhancements, and tweaks:

  1. when splitting a line, null terminate the new line; also don’t inherit the dle from the previous line
  2. support github checkbox list items (static configuration option)
    1. --github-checkbox does the checkbox with html check entities
    2. --github-checkbox=input does them with html <input> elements (set to disabled so that people can’t check and uncheck willy-nilly)
  3. fix the broken footnote code; allow paragraphs of footnote, not just one line of footnote.
  4. delete HGROUP from the list of html5 elements, because the w3c working group decided to punt it
  5. on systems that support it, use the ‘destructor’ attribute on mkd_shlib_destructor() so it will run automatically when the library unloads.
  6. add --cxx-binding option to to generate a mkdio.h that’s got an extern "C" wrapper around it.

In the grand scheme of things, these are pretty tiny patches. The splitline bug is something that never showed up locally, but popped right up when the afl stress test suite was run against it. I was unable to get afl to actually work (it really wants to be plunked down inside a virtual machine, but I don’t run docker or any of the other lightweight virtual environments) but the clang option -fsanitize=address puts super-paranoid bounds checking into place on my mac and that caught the error for me. The footnote bug required a much more substantial change to the code, but the test cases I wrote for it have failed to fail (or dump core) so it appears to be working. In any case, you should run out and download the sources and see if you can find a previously undocumented emergency exit feature.