other link types, and explicitly if() ... else the control flow
2. make the protocols[] array into an name/size structure, so I don't
have to spend time doing strlen() when running isautoprotocol().
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.
-------------
1. Add MKD_CDATA, which tells markdown to massage the output so it's
good as data in an xml file (an rss or atom feed, most likely)
2. more data massaging for characters in a url.
*************
1. add the flag MKD_CDATA, which tells markdown() to sanitize
the output so it can be used as data in a xml document.
2. encode possible control characters in urls.
add a manpage for new functions, modify the makefile to add
a rule to install example programs (just theme for now) and
modify the manpage installer to add links to mkd-functions(3)
`<script>` blocks are added by the simple expedient of adding "`SCRIPT`" to
the blocktags[] table, but `<style>` blocks need to be written into the
document `<head>`, so they have to be stored as a different type and
output with the new function `mkd_style()` and **not** by `mkd_generatehtml()`
2. define the flag `MKD_EMBED`, which turns on `<>` and `"`expansion.
3. modify `theme` so it keeps track of whether it's inside html tags and
whether it's in the header or body of a page.
version.c.in is version.c ready to be preprocessed to include a constant
TABSTOP string (the ansi cpp may be able to convert an integer into a string
with `#`, but gcc does not properly implement the ansi preprocessor, so we've
gotta use sed instead.)
test suite. It turns out that _paragraphs act differently_ depending
on whether they're at the top level or not. If it's a toplevel paragraph,
it absorbs adjacent list items, otherwise it breaks them into a list block.
and end of a code run. (fixes "(\`\` \` \`\`)" defect)
2. trim spaces at the end of the first line in any block. (fixes
a defect where the reference trims spaces at the start of a code
block, but I didn't.)
1. Officially expose mkd_compile(), mkd_cleanup(),
mkd_generatehtml().
2. Internally use the new Document structure, which
hold the markup and (optionally) header information.
3. Support ``--enable-<foo>`` during configure.sh
* change --with-dl-tag to --enable-dl-tag.
* add --enable-pandoc-header to support pandoc headers.
bookmark tags are now stored without the framing [] and a trailing 0;
the bookmark compare function compares S(a->tag) and S(b->tag) before
doing the strncasecmp() on T(a->tag) and T(b->tag)
You can start a quoted block by doing
>blah
but once you're inside the block markdown assumes the
prefix is '> ', so you need a *5* space indent from
the '>' to introduce a code block.
EOF at end of stream, but if I use do a sscanf(cursor(), ...), it
will cheerfully run off the end of the stream and into core dump
city unless I put a guard there.