Age | Commit message (Collapse) | Author |
|
This is for consistency with the other types of nodes that have
literal strings as contents.
|
|
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.
|
|
The broken last_line_blank logic could lead to random failures in the
API tests.
|
|
The separate directory presents problems for some simple
extension building systems, like luarocks.
|
|
Fixes issue with Ctrl-D having to be pressed twice when reading from
terminal.
|
|
|
|
Replace cmark_parser_process_line with cmark_parser_push that takes
arbitrary chunks of data. Also fixes #211.
|
|
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.
|
|
Previously, if malloc failed to allocate 'newstack', the function
would return without freeing 'stack'. Pointed out by clang static
analyzer.
|
|
Clang static analyzer pointed out that the value assigned to 'pos'
is never read.
|
|
|
|
|
|
|
|
Technically we could do without this, since we can check for
cmark_fence_length > 0. But it makes the code clearer and doesn't
really increase the size of the node struct (because the size of the
union is set by the data for lists).
|
|
|
|
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.
|
|
|
|
The C and JS implementations were not registering blank lines
after atx headers for purposes of tight/loose list calculation.
Exmaple:
* item
* # block1
## block2
|
|
A setext header was being treated a if it were a blank
line for purposes of tight/loose list determination.
Closes #209.
|
|
|
|
|
|
Previously parse_inlines returned a list of parsed inlines.
This had to be added to the parent, and fix_parents had to be
called to manually add the 'parent' links to the children, and
the 'last_child' link to the parent.
Now parse_inlines takes the parent block as a parameter,
and uses cmark_node_append_child to add the children, so that
the pointers should be properly managed. This avoids the need
for the fix_parents pass.
|
|
|
|
|
|
|
|
|
|
|
|
Also switched from `bullet`, `ordered`, `parens`, `period` to
`CMARK_BULLET_LIST`, `CMARK_ORDERED_LIST`, `CMARK_PAREN_DELIM`,
`CMARK_PERIOD_DELIM`.
|
|
Now it's in blocks.c, the only module that uses it.
|
|
Let cmake create a cmark_config.h file to deal with platforms missing
stdbool.h.
|
|
Needed for C++ compatibility.
|
|
Needed for C++ compatibility.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Closes #187.
|
|
|
|
|
|
See #187.
|
|
Closes #169.
|