Commit Graph
18 Commits
Author SHA1 Message Date
david parsons 647e65069e when dumping the parse tree, say which header is being dumped -- h1..h6 vs just header 2019-02-23 00:35:16 -08:00
david parsons 7fdc188f07 clean up all references to flags; define them EVERYWHERE as mkd_flag_t 2018-09-18 08:25:27 -07:00
david parsons f555d4c1c4 fix all places where I pass flags to be DWORDs 2018-09-14 20:18:17 -07:00
david parsons a12d7d7294 take a pass at github checklist items 2018-04-17 18:09:33 -07:00
Koen Punt 37659eb654 handle cleanup from the caller
instead of freeing the resource in mkd_xhtmlpage and mkd_dumptree, the mkd_cleanup now has to be explicitly called.
2015-10-25 15:46:53 +01:00
david parsons cdfbe70b51 In dumptree(), don't spit out the paragraph blocking if it's
nothing or `<p>` (most everything is `<p>` blocked, so saying
it doesn't actually tell anything.)
2011-01-28 22:12:03 -08:00
David Parsons 19b61eac92 don't describe <style> blocks as mystery node during markdown -d 2010-03-30 08:48:33 -07:00
David Parsons 4e47508782 Modify configure.inc so that AC_SCALAR_TYPES can be
used to generate either #defines for config.h or
substitutions for config.sub
2010-01-28 17:52:53 -08:00
David Parsons b9302c7920 1. Add the new E(x) abstraction for the ANCHOR() class, use
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.
2009-08-12 12:21:53 -07:00
David Parsons b134f9532b 1. Add "table" to the list of tokens recognised in dumptree.
2. Don't bother to consume blank lines when we start in `compile_document()`
2009-08-12 01:06:06 -07:00
David Parsons fe3138bfd0 First pass at code to fix the [footnote]: anywhere defect; split
`compile()` out into `compile_document()` (toplevel; split documents
into html, style, sourcecode, extracts all footnotes) and `compile()`
(compiles all content, but does not process html blocks or footnotes)

Not perfect: I should not need the SOURCE object type -- I should be
able to simple compile a block of source and append that source onto
the top-level paragraph list, but when I do that I end up with memory
leaks and test failures.
2009-08-12 00:43:32 -07:00
david parsons 5c6115c601 1. Add the new amalloc module, which (if enabled with
--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.
2008-04-03 11:22:07 -07:00
david parsons 7ad388b35e Modify mkd_dump() so that the output FILE* actually means something. 2008-01-12 00:07:06 -08:00
david parsons 7701fda2ee Remember how I said that the 0.9 published interface was likely to be
the official published interface for version 1.0?  I lied.
2008-01-11 15:42:13 -08:00
david parsons 3fc49328f3 Rework the published interface.
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.
2008-01-10 12:22:39 -08:00
david parsons 8623538446 Split markdown.c into markdown.c [compiler] and generate.c [html generator] 2008-01-08 10:46:08 -08:00
david parsons cae8ac3f8c Restructure the "not officially, honest" published __mkd__ function
that does the work;  it's now __mkd_compile() [setup + compile], which
compiles the input, sets up a MMIOT, then returns a pointer to the
compiled Paragraph tree, and __mkd_cleanup() which cleans up all of
the data structures created by __mkd_compile().
Also add a title argument to mkd_dump() so I can show the tree rooted
at a title (the filename of the input file, or `stdin` if none was
given.)
2008-01-08 09:59:34 -08:00
David Parsons 62ba2de2b8 Add a debugging tree dump (accessed by ``markdown -d'') and
clean up garbage pointers after compiling lists and quoted
string.
2008-01-07 18:27:25 -08:00