summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2015-01-05Reformatted code consistently with astyle.John MacFarlane
2014-12-31Write to stdout in binary mode on WindowsNick Wellnhofer
This fixes the output of newlines.
2014-12-29Added options parameter to renderers.John MacFarlane
To keep the API simple and avoid API changes when new options are added, this is just a long integer. Set it by disjoining options that are defined as powers of 2: e.g. `CMARK_HTML_SOURCEPOS | CMARK_HTML_HARDREAKS`. Test options using `&`: `if (options & CMARK_HTML_SOURCEPOS)`. Added `--hardbreaks` and `--sourcepos` command-line options.
2014-12-28Removed old 'ast' format, now that we have 'xml'.John MacFarlane
The xml representation of the AST is not quite as pretty, but it contains the same information and is not in an ad hoc format. See #53.
2014-12-28Added xml writer, to dump the AST in XML.John MacFarlane
This is a work-in-progress. CommonMark.dtd gives the DTD for the generated XML. Closes #53.
2014-12-13Added cmark_render_man (man page writer).John MacFarlane
cmark: Replaced `--man` and `--ast` with generic `--to` option.
2014-12-02Fix EOF detectionNick Wellnhofer
Fixes issue with Ctrl-D having to be pressed twice when reading from terminal.
2014-11-30Renamed cmark_parser_push -> cmark_parser_feed.John MacFarlane
2014-11-29Push parser interfaceNick Wellnhofer
Replace cmark_parser_process_line with cmark_parser_push that takes arbitrary chunks of data. Also fixes #211.
2014-11-28Removed cmark_free_nodes from public API.John MacFarlane
Replace it with static S_free_nodes.
2014-11-28Renamed identifiers in public API:John MacFarlane
cmark_doc_parser => cmark_parser cmark_new_doc_parser => cmark_parser_new cmark_free_doc_parser => cmark_parser_free cmark_finish => cmark_parser_finish cmark_process_line => cmark_parser_process_line cmark_node_destroy => cmark_node_free Closes #223.
2014-11-25Replaced cmark_debug_print with cmark_render_ast.John MacFarlane
This returns a string.
2014-11-22Make parser accept a char*Nick Wellnhofer
2014-11-22Make render_html return a char*Nick Wellnhofer
2014-11-17Switch cmark_node_inl over to cmark_nodeNick Wellnhofer
2014-11-17Switch cmark_node_block over to cmark_nodeNick Wellnhofer
2014-11-16Free the string returned by html renderer in main program.John MacFarlane
2014-11-16Moved MAX_LINK_LABEL_LENGTH out of public header.John MacFarlane
Put it in ast.h.
2014-11-16Probe for stdbool.hNick Wellnhofer
Let cmake create a cmark_config.h file to deal with platforms missing stdbool.h.
2014-11-16Don't use variable-length arraysNick Wellnhofer
They're not supported by MSVC.
2014-11-16We don't need to include stdbool in the public header.John MacFarlane
2014-11-16cmark_render_html now just returns a regular C string.John MacFarlane
This way, we don't have to expose buffer.h; it is just used internally.
2014-11-15Expose lower-level parsing API.John MacFarlane
The new functions cmark_new_doc_parser, cmark_free_doc_parser, cmark_process_line, and cmark_finish allow you to feed lines one by one (possibly from several files) to the parser and call finish when you're done. This is now used in main for mulitple files.
2014-11-14Added some includes of buffer.hJohn MacFarlane
2014-11-13Moved the timing macros to get finer-grained information.John MacFarlane
2014-11-13Added bench.h and inserted timing macros in main.John MacFarlane
`make TIMER=1` to build with timings.
2014-11-13Rename cmark_free_nodes -> cmark_free_blocks.John MacFarlane
2014-11-11Don't include debug.h in any production code.John MacFarlane
It uses some GNU-specific things.
2014-10-24Renamed c program and library stmd -> cmark.John MacFarlane
Also renamed internal library functions accordingly.
2014-10-18Reindented c sources.John MacFarlane
2014-09-15Cleanup external APIsVicent Marti
2014-09-09Rename node_blockVicent Marti
2014-09-09Rename to strbufVicent Marti
2014-09-09ffffixVicent Marti
2014-09-09lolVicent Marti
2014-09-06replace Standard Markdown with CommonMarkPablo Rodríguez
2014-08-13main.c: Fixed reading of files specified on command line.John MacFarlane
2014-08-13Initial commitJohn MacFarlane