Commit Graph
14 Commits
Author SHA1 Message Date
david parsons cd12966243 Documentation patches from David Banks; correct the documentation to show the actual return values from mkd_generatecss 2011-02-28 06:56:22 -08:00
Alessandro Ghedini b11ae91b32 fix manpages errors 2011-02-19 19:04:19 +01:00
david parsons 36810e0567 s/Compatability/Compatibility/g 2011-01-09 10:10:48 -08:00
david parsons 88c049675e Describe MKD_NOSTRIKETHROUGH in mkd-functions(3); fix a typo in mkd-extensions(7) 2010-09-01 13:46:08 -07:00
David Parsons ac59073ea1 1. Attempt to update the documentation for the new functions.
2. Fix broken parameter order in xml.c
3. publish mkd_generatexml, mkd_xml in mkdio.h
2009-05-12 12:37:59 -07:00
David Parsons 9d592125e0 Replace mkd_style() with the new function mkd_generatecss();
also create the new function `mkd_css()`, which allocates and
populates a string containing the style section.  `mkd_style()`
is left published, but as a `#define` pointing to `mkd_generatecss()`
2009-05-11 22:17:06 -07:00
David Parsons 4456632ae5 Roll up to compatability with MarkdownTest_1.0.3 (features not documented
in the language definition at Daringfireball) and add in compatability flags
to programmatically revert back to 1.0 compatability mode for testing
purposes.

The new markdown flag MKD_1_COMPAT turns on trailing space trimming of
the first line of codeblocks, and turns off support for implicit reference
links ([links] rather than [links][]);  it is enabled in the `markdown`
program with the flag -f1.0 (-F0x2000)
2009-02-27 22:47:03 -08:00
David Parsons 9397c0a5c7 Redo toc.c to add the new function mkd_toc(), which writes the
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.
2009-02-27 16:47:02 -08:00
David Parsons 46fd4cb518 Document mkd_generatetoc(), mkd_xhtmlpage(), --enable-alpha-list 2008-10-21 08:53:22 -07:00
David Parsons a59e83ec29 Add support for table-of-contents generation (code supplied by Jjgod Jiang)
and a function that generates a rudimentary xhmtl page from a markdown
document (idea from Tim Channon)
2008-09-26 11:39:32 -07:00
david parsons ed662dfea3 Implement a somewhat better way of handling embedded emphasis,
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.
2008-04-10 15:49:19 -07:00
david parsons 5acd4933bf Update the documentation to refer to MMIOT* instead of MMIOT 2008-01-23 11:52:12 -08:00
david parsons d5266835af Forgot a comment in the xref section of mkd-functions.3
Add the -V option to theme
2008-01-19 00:29:16 -08:00
david parsons c8b8c52890 Update the manpages to follow the latest published interface,
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)
2008-01-19 00:24:44 -08:00