This Space for Rent

New Code!

Discount is now officially at version 2.2.6, which is going to be (modulo some horrible bug popping up and waving at me) the last of the version 2 series and the last of the version 1 published interface (I am redoing the flags so I can support more than 32 feature flags in version 3.) This release should have been released last fall, but, sadly, I was so busy trying out v3 changes that I completely forgot about it.

2.2.6 does not add many new features, or fix very many bugs, but here they are:

bugs
  • deal with cached text before handling fenced code blocks
  • don’t give a code block class if it’s just an empty string
  • mkd2html wasn’t passing pgm to hoptusage()
  • mkd2html wasn’t properly handling two arguments for input & output files. While I was at it, add the -G option to use gfm_in() to read the input file in (and preserve newlines)
  • push the fencedcode block handler up to the toplevel scanner so it will handle blank lines inside the fence
features
  • add an anchor format callback, plus add the -x option to the markdown program to squash toc anchors to (close to) github compatability
  • add an external code block formatter to the markdown program
  • clean up all references to flags; define them EVERYWHERE as mkd_flag_t
  • support external code formatters
tweaks
  • change configure.sh to
    1. use the modern standard uintXX_t types for DWORD, WORD, BYTE if possible, and
    2. if a program is defined via an environment variable (like CC) try to use that variable instead of doing a path search in AC_PROG
  • make a test program to examine pandoc header elements
  • patch the cmakefile so that has an option to only generate a library
  • set the Plan9 CFLAGS to the two extensions (instead of having them be part of the CC macro) and wipe out any CFLAGS (like -T, which tells the Plan9 posix C compiler to be stupid) that already exists
  • the Makefile macros a bit so people can wedge in their own compilers (BUILD) and linkers (LINK) during a build
  • when dumping the parse tree, say which header is being dumped – h1..h6 vs just header

This code has been running on pell w/o incident for the past 5 or so months) so there’s no reason not to spit on your hands, hoist the skull & crossbones, and download it now!