New Code!
Discount is now up to version 2.0.8 with a small batch of new features, tweaks, documentation changes, and feature revisions:
- Modify table handling to make it hew closer to the markdown extra implementation
- Put an optimization in to make table detection faster
- Documentation patches from David Banks
- argument prototype tweaks for Solaris, from Allen Otis
--with-github-tags
configuration option to to include-
and_
in the acceptable characters formaybe_tag_or_link()
(code from Ryan Tomayko’s discount SCCS on github.)- in the
markdown
program,-f?
gives a list of the known flags. --with-id-anchor
configuration options to have the table of contents code emitid=
instead of the dummy<a name=
anchor I replaced it with (name=
is depreciated in xhtml, and may vanish.
Most of these changes won’t change the way the code works, but the changes to table
handling will; markdown extra tables revised the parser so you can escape :
and |
,
and between that and the extra parsing needed to make my table detector work the same
way as the markdown extra version, I ended up with discount running memchr()
on every line three times to detect |
s for tables.
I revised the internal data structures so that every line carries a flags word, and turn on one of the bits there to tell the rest of the code whether a |
was seen when the document source was read in in the first place. This one little change gave me back about 5% computing time running against the reference markdown testsuite.
I’m not completely sure whether these changes will have unexpected side effects, but I’ll never find out about them if it just sits at home. So here’s some nice fresh New Code! for you to test out and see!