Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-12-29 | Attempted optimization of cmark_ctype. | John MacFarlane | |
Use a single lookup table for all character types. I'm not sure this actually helps so much. | |||
2014-12-29 | Renamed a couple variables. | John MacFarlane | |
2014-12-29 | Added cmark_ prefix to functions in cmark_ctype. | John MacFarlane | |
2014-12-29 | Added cmark_ctype.h with locale-independent isspace, ispunct, etc. | John MacFarlane | |
Otherwise cmark's behavior varies unpredictably with the locale. `is_punctuation` in utf8.h has also been adjusted so that everything that counts all ASCII symbol characters count as punctuation, even though some are not in P* character classes. | |||
2014-12-29 | Avoid warning about unused options parameter in man writer. | John MacFarlane | |
2014-12-29 | Make `--sourcepos` affect xml writer too. | John MacFarlane | |
2014-12-29 | Added 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-28 | Added cmark_node_set_list_delim, cmark_node_get_list_delim. | John MacFarlane | |
Even though this doesn't make a difference in default HTML output, it's worth keeping track; some output formats may allow you to distinguish lists with `1)` and with `1.` delimiters. | |||
2014-12-28 | Added CMARK_NO_DELIM to cmark_delim_type | John MacFarlane | |
2014-12-28 | Removed 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-28 | Improved end column/end line calculations in finalize. | John MacFarlane | |
2014-12-28 | Added end_column to cmark_node struct. | John MacFarlane | |
API exports cmark_node_get_column. XML writer indicates start and end line and column for block-level nodes. | |||
2014-12-28 | blocks.c - removed unneeded start_line parameter from make_block. | John MacFarlane | |
2014-12-28 | blocks.c: removed redundant line_number param in finalize. | John MacFarlane | |
Also break_out_of_lists. | |||
2014-12-28 | Rename CMARK_NODE_LIST_ITEM -> CMARK_NODE_ITEM. | John MacFarlane | |
2014-12-28 | Revamped xml writer and dtd to use lowercase element names. | John MacFarlane | |
2014-12-28 | Rename cmark_node_type_string -> cmark_node_get_type_string. | John MacFarlane | |
And export in cmark.h public header. Also, use lowercase names, not uppercase. | |||
2014-12-28 | Added 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-28 | Expose cmark_node_type_string in node.h (private header). | John MacFarlane | |
Previously was static function S_type_string. | |||
2014-12-26 | Optimized the change in 72a556fd3bd17feaffba2fb6faa8c8f2a3931643. | John MacFarlane | |
Thanks @Knagis. | |||
2014-12-25 | Updated C parser to handle #252. | John MacFarlane | |
Closes #252. | |||
2014-12-25 | Improved rules for emphasis and strong emphasis. | John MacFarlane | |
This improves parsing of emphasis around punctuation. Background: http://talk.commonmark.org/t/emphasis-inside-strong-broken-in-js-implementation-when-parenthesis-involved/903/6 The basic idea of the change is that if the delimiter is part of a delimiter clump that has punctuation to the left and a normal character (non-space, non-punctuation) to the right, it can only be an opener. If it has punctuation to the right and a normal character (non-space, non-punctuation) to the left, it can only be a closer. This handles cases like **Gomphocarpus (*Gomphocarpus physocarpus*, syn. *Asclepias physocarpa*)** and **foo "*bar*" foo** better than before. The spec section on Emphasis and Strong Emphasis has been extensively revised. The C and JS implementations have been brought up to date, and all tests pass. | |||
2014-12-16 | scanners.re: use cmark_chunk rather than chunk. | John MacFarlane | |
2014-12-16 | Added 'literal' field to 'code' struct. | John MacFarlane | |
In the last few commits we were using as.code.fenced and as.literal at the same time for NODE_CODE_BLOCK, which obviously led to problems. | |||
2014-12-16 | HTML writer: fixed bug in detection of fenced code blocks. | John MacFarlane | |
2014-12-16 | print: print fenced and fence_length for code blocks. | John MacFarlane | |
2014-12-15 | Re-added cmark_ prefix to strbuf and chunk. | John MacFarlane | |
Reverts 225d720. | |||
2014-12-14 | Added comment. | John MacFarlane | |
2014-12-14 | Use UTF-8 sensitive functions to check for spaces around emph markers. | John MacFarlane | |
2014-12-14 | Rename get/set_string_content -> get/set_literal. | John MacFarlane | |
2014-12-14 | Use cmark_iter to avoid stack allocation in process_inlines. | John MacFarlane | |
2014-12-14 | man writer: use chunk literal in code blocks. | John MacFarlane | |
2014-12-14 | Added GNU profiler flags to debug build. | John MacFarlane | |
2014-12-14 | Use chunk for fenced code info, instead of strbuf. | John MacFarlane | |
2014-12-14 | Use as.literal instead of string_content for HTML and code blocks. | John MacFarlane | |
This is for consistency with the other types of nodes that have literal strings as contents. | |||
2014-12-14 | Added empty clauses for DOCUMENT node to html and man writers. | John MacFarlane | |
For completeness. | |||
2014-12-14 | Rename CMARK_NODE_INLINE_CODE -> CMARK_NODE_CODE. | John MacFarlane | |
2014-12-13 | Added API documentation to src/cmark.h. Closes #224. | John MacFarlane | |
2014-12-13 | Removed cmark_node_handler - it was used by cmark_walk, now deleted. | John MacFarlane | |
2014-12-13 | Write API docs in cmark.h using markdown. | John MacFarlane | |
`man/make_man_page.py` now converts using cmark. | |||
2014-12-13 | Added cmark_render_man (man page writer). | John MacFarlane | |
cmark: Replaced `--man` and `--ast` with generic `--to` option. | |||
2014-12-13 | Added 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. | |||
2014-12-13 | API improvements: cmark_event_type parameter for walk handlers. | John MacFarlane | |
Added cmark_event_type enum, which is used as the second parameter of the handler passed to cmark_walk. See #224. | |||
2014-12-13 | Remove CMARK_NODE_REFERENCE_DEF from API. | John MacFarlane | |
Modified finalize in blocks.c to return parent of finalized block, so we can handle the case of reference definitions, when we simply remove the finalized block. | |||
2014-12-13 | Removed cmark_ prefix on chunk and strbuf. | John MacFarlane | |
This isn't needed any more since we don't expose these in the API. | |||
2014-12-12 | Revert "Removed CMARK_NODE_REFERENCE_DEF from API." | John MacFarlane | |
This reverts commit b598b52a4acdc2332be3d34e30237d1b93b7dd03. The change led to some problems, because some of the callers of 'finalize' expected the node to exist after the call. This could all be rewritten, but for now let's just revert. | |||
2014-12-12 | Rudimentary documentation for cmark_walk. | John MacFarlane | |
2014-12-12 | Removed CMARK_NODE_REFERENCE_DEF from API. | John MacFarlane | |
There's no reason to store these empty nodes in the API. The references have already been resolved. | |||
2014-12-12 | Rewrote HTML renderer using cmark_walk. | John MacFarlane | |
This version is shorter, more readable, and more regular. It should serve as a template for creating new writers. Performance is the same. All tests pass. | |||
2014-12-12 | Added cmark_node_handler and cmark_walk to header. | John MacFarlane | |