This involves reworking the blocktag[] array into a STRING(), and moving the entire
kit and kaboodle out into a separate file with a public initializer (mkd_prepare_tags),
definer (mkd_define_tag) sort (mkd_sort_tags, and lookup (mkd_search_tags) function.
The html5 tags are further removed into their own function (mkd_with_html5_tags) which
can be included when someone wishes to have html5 support.
Note that html5 support is library-wide; once you call mkd_with_html5_tags, you're
stuck with them everywhere and can't back them out. This might be revisited later,
that when processing Lines in compile_document().
2. Add some test cases for [footnote] links showing up in
random places.
3. In `dumptree()`, show the `ident` string ,if any, associated
with a given block.
monster bodge. It's no shorter, but it's a little bit clearer, I
hope, and now I can revisit it and rework the whole link name gathering
scheme if need be.
`__mkd_emblock` -> `___mkd_emblock`), add prototypes in `markdown.h`,
change `Csputc()` from an int to a void function, make `Csreparse()`
a void function.
generate toc to a string. Documented in `markdown.3`
and `mkd-functions.3`, requires a new file (`Csio.c`) that has
functions for writing to a Cstring, requires that some of the
internal functions in `generate.c` be exposed (and renaed to
`__mkd_`*function* to reduce namespace collisions.
The new functions in Csio (particularly `Csprintf()` should make
it easier to convert many of the other "we print to a `FILE*` and
you need to lump it" functions into a pair of "print to a string"
and "print to a file" functions.
by writing compiled output into a token queue, then running
an emphasis maker on that queue. The token queue is an array
of TEXT and EMPHASIS tokens -- `TEXT` being what you'd expect,
and `EMPHASIS` holding counts of consecutive emphasis characters.
It's easier to explain with pretty pictures:
During the process of compiling the string `***HI***`, it gets
broken into five tokens:
1. TEXT `<p>`
2. EMPHASIS `*`3
3. TEXT `HI`
4. EMPHASIS `*`3
5. TEXT `</p>`
and then pasted together into a compiled document. During the
pasting, emphasis tokens are paired with the next matching emphasis
token, then rewritten into two text sections (opens & closes) which
are treated as normal text during the pasting.
The above tokens are processed like so; first to
1. TEXT `<p>`
2. EMPHASIS `*`1 [] [`<strong>`]
3. TEXT `HI`
4. EMPHASIS `*`1 [`</strong>`] []
5. TEXT `</p>`
then to
1. TEXT `<p>`
2. EMPHASIS `*`0 [] [`<strong><em>`]
3. TEXT `HI`
4. EMPHASIS `*`0 [`</em></strong>`] []
5. TEXT `</p>`
which is then concatenated to
<p><strong><em>HI</em></strong></p>
And Bob's your uncle.
--enable-amalloc) replaced malloc and its ilk with
versions that attempt to maintain a linked list of
allocated blocks that can be printed to stderr with
the `adump()` function.
2. Clean up a couple more places where I leak memory
during the first level parse.
3. tweak cstring.h to try to chase down places where
the C compiler might optimize EXPAND() into producing
broken code.
2. clean up \-escapes so that only special characters will be escaped.
3. Use the entity � as a token break.
4. check for the existance of goddamn gcc
1. Add the new method mkd_string(), which assembles a list from a string.
2. Add a tests directory and three test files.
3. Move the smartypants code out into a separate function, so I can
(eventually) pass a /don't_be_clever/ flag in to the markdown()
function.
4. Redo the mail address mangler so I can mangle the
mailto: as well as the address.
5. Fix a bug in the DELETE() macro in cstring.h
6. Fix dependencies in the Makefile so that a reconfigure forces a
complete recompile.
7. Code tweaks to make gcc stfu
8. Tweak the build dependencies again.