Age | Commit message (Collapse) | Author |
|
|
|
This reverts commit 485ef21b95e257e9d9cbcaa804c3c164f1f49a80.
Apparently the va_copy IS needed, because without this code
we get segfaults in some cases.
Closes #253.
@nwellnhof, can you have a look at this issue and comment?
I understand that this code was removed for portability reasons.
Is there an alternative solution?
|
|
This reverts commit 46b67b710788be7924b5a412ab68eea3cac0cd96.
I was mistaken that this helped. Which is good, because I would
not have understood why it helped.
|
|
We get segfaults on some platforms when we do
cmark_strbuf_printf(man, " (%s)", cmark_node_get_url(node));
but they go away with:
url = cmark_node_get_url(node);
cmark_strbuf_printf(man, " (%s)", url);
I don't understand why.
Closes #253.
|
|
Use a single lookup table for all character types.
I'm not sure this actually helps so much.
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
API exports cmark_node_get_column.
XML writer indicates start and end line and column for block-level
nodes.
|
|
|
|
Also break_out_of_lists.
|
|
|
|
|
|
And export in cmark.h public header.
Also, use lowercase names, not uppercase.
|
|
This is a work-in-progress.
CommonMark.dtd gives the DTD for the generated XML.
Closes #53.
|
|
Previously was static function S_type_string.
|
|
Thanks @Knagis.
|
|
Closes #252.
|
|
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.
|
|
|
|
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.
|
|
For completeness.
|
|
|
|
|
|
|
|
`man/make_man_page.py` now converts using cmark.
|
|
cmark: Replaced `--man` and `--ast` with generic `--to` option.
|
|
* 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.
|