Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
API exports cmark_node_get_column.
XML writer indicates start and end line and column for block-level
nodes.
|
|
|
|
And export in cmark.h public header.
Also, use lowercase names, not uppercase.
|
|
Previously was static function S_type_string.
|
|
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.
|
|
Reverts 225d720.
|
|
|
|
|
|
This is for consistency with the other types of nodes that have
literal strings as contents.
|
|
|
|
* 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.
|
|
Added cmark_event_type enum, which is used as the second
parameter of the handler passed to cmark_walk.
See #224.
|
|
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.
|
|
This isn't needed any more since we don't expose these in the API.
|
|
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.
|
|
There's no reason to store these empty nodes in the API.
The references have already been resolved.
|
|
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.
|
|
|
|
This reverts commit 6c1f76a8a22f6c84231e5101f0950ce353ec8075.
|
|
|
|
|
|
This is more consistent with CMARK_LIST_NONE, etc.
|
|
This is the return value of cmark_get_node_type when the argument
is a null pointer. Avoids segfault.
|
|
|
|
Replace it with static S_free_nodes.
|
|
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.
|
|
This can be changed if support for node lists is added to the public API.
|
|
In JS, use 'Text' instead of 'Str'.
In spec, use "plain textual content" instead of "strings."
|
|
Use a single CMARK_NODE_CODE_BLOCK tag for both.
Distinguish them when needed for parsing by looking at the
fence_length attribute, which is 0 for indented blocks.
|
|
This reverts commit 4570eb2bff2e1b71fa5b6408abbc69c98ff5ff24.
|
|
This reverts commit a71423f6ee1b77d9f79d42599ea00b4ca99f5da0.
Not quite sure about this change, so reverting for now.
Note that we still have a distinction between fenced and
indented code blocks in the AST. These two distinctions
seem to stand or fall together.
|
|
Now we just have 'header' -- Setext and ATX are just two ways
of forming these; it's not a semantic difference that should remain
in the AST.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are read-only as they're only metadata returned by the parser.
|
|
|
|
Only fence info should be relevant for rendering. Accessors for other
fenced code data could be added for completeness but they don't seem
very useful.
|
|
Only 'list_type', 'start', and 'tight' should be relevant for rendering.
Accessors for other list data could be added for completeness but they
don't seem very useful.
|
|
|
|
|
|
|
|
The approach I'm taking is to copy inline literals internally to
NULL-terminated C strings if requested by an accessor. This allows to
return a 'const char *' that doesn't have to be freed by the caller.
|
|
|