New Code!
Discount has (finally) been rolled up to version 1.3.0 with the addition of documentation for all of the new features I put in for the 1.3.0prexxx series.
To recap the feature list, I’ve added
- In the
theme
program, if I pass it a directory argument it will attempt to open the fileindex
in that directory. - Add the flag
MKD_STRICT
, which disables superscript (A^B
≠ AB) and sane handling ofA_B
Add blockquote-as-division processing; a blockquote that has a first line of
>%ident%
expands to<div class="ident"> . . . </div>
instead of the traditional
<blockquote>
.
.
.
</blockquote>
Extend list processing to enable alphabetic lists;
a. this b. is a c. test
expands to
<ol type=a> <li>this</li> <li>is a</li> <li>test</li> </ol>
(enabled with
-enable-alpha-list
)- Add table of content support; if discount is run with the
MKD_TOC
flag,<h
N>
’s arename=
d, and the functionmkd_generatetoc()
will dump a nested list containing links to every header in the document. - Add the new function
mkd_xhtmlpage()
, which dumps the document wrapped in a skeletal html page, with the title taken from the header block and styles taken from any<style>
blocks. - Add the new demo program
makepage
, which is a program wrapper aroundmkd_xhtmlpage()
And I’ve fixed a few bugs and boundary conditions:
- Single-character ETX headers now work.
- Null lists don’t cause core dumps any more.
- Don’t set subblock paragraph alignment unless that subblock actually has content.
- Zero the input buffer every time I finish processing it (I was getting lookback errors with relaxed emphasis.)
- An inline code block now needs both beginning and ending `’s
- When processing lists, don’t kick header blocks out of the line.
- Correct list processing so that
- A 1. B
produces a single
<ul>
list, not a<ul>
list followed by a<ol>
list. - Do not superscript items inside a title.
- The line
##
should now expand to<h1>#</h1>
Have I missed anything? Perhaps I have, but there’s only one way to find out – grab this New Code! and see if the smoke comes rolling out of your computer or not.