summaryrefslogtreecommitdiff
path: root/src/iterator.c
AgeCommit message (Collapse)Author
2015-12-28Rename NODE_HTML -> NODE_HTML_BLOCK, NODE_INLINE_HTML -> NODE_HTML_INLINE.John MacFarlane
API change. Sorry, but this is the time to break things, before 1.0 is released. This matches the recent changes to CommonMark.dtd.
2015-12-22Rename hrule -> thematic_break.John MacFarlane
CMARK_NODE_HRULE -> CMARK_NODE_THEMATIC_BREAK. However we've defined the former as the latter to keep backwards compatibility. See jgm/CommonMark 8fa94cb460f5e516b0e57adca33f50a669d51f6c
2015-08-10Remove need to disable MSVC warning 4800Kevin Wojniak
2015-07-27Use clang-format, llvm style, for formatting.John MacFarlane
* Reformatted all source files. * Added 'format' target to Makefile. * Removed 'astyle' target. * Updated .editorconfig.
2015-05-07cmark_consolidate_text_nodes: Avoid an unnecessary string allocation.John MacFarlane
2015-05-06cmark_consolidate_text_nodes: avoid some unnecessary allocation.John MacFarlane
This improves on #32, I think. @elibarzilay, does this look better? We now avoid the allocations associated with cmark_get_literal, and copy directly from the chunk to the buffer.
2015-05-04Better solution for memory leak in `cmark_consolidate_text_nodes`.John MacFarlane
This avoids allocating a new string. Closes #32.
2015-05-04Straightforward fix for memory leak #32.John MacFarlane
2015-02-15Fixed segfault with --normalize (closes #7).John MacFarlane
This bug was introduced after the modification in 009c3847f004fda437dd5376a9452973b1cb913e.
2015-01-20Accessor for iterator's root nodeNick Wellnhofer
2015-01-12Some astyle reformatting.John MacFarlane
2015-01-10Rework iteratorsNick Wellnhofer
* Advance to the next node when calling 'cmark_iter_next', not when calling 'cmark_iter_get_node'. * Add 'cmark_iter_get_event_type' accessor. * Allow deletion of nodes after an 'EXIT' event, or an 'ENTER' event for leaf nodes.
2015-01-10Optimize S_is_leafNick Wellnhofer
2015-01-09Minor code reformatting.John MacFarlane
2015-01-08Added `cmark_iter_reset` and a note about handling destructive updates.John MacFarlane
2015-01-07cmark: Add function & option to normalize text nodes.John MacFarlane
So, instead of <text>Hi</text> <text>&amp;</text> <text>lo</text> we get <text>Hi&amp;lo</text> * Added exported `cmark_consolidate_text_nodes` function. * Added `CMARK_OPT_NORMALIZE` to options. * Added optional normalization in XML writer. * Added `--normalize` option to command-line program. * Updated man page.
2014-12-14Rename CMARK_NODE_INLINE_CODE -> CMARK_NODE_CODE.John MacFarlane
2014-12-13Added iterator interface to API, removed cmark_walk.John MacFarlane
* Added `iterator.c`, `iterator.h`. * Removed `cmark_walk`. * Replaced `cmark_walk` with iterator in HTML renderer. * Replaced API test for `cmark_walk` with simple iterator test.