diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-02 16:23:25 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-02 16:23:25 +0200 |
commit | 0b1886ca44e0b562f9022ad95568acd6f9b4e1d2 (patch) | |
tree | fdd102e8790f4c114138be472d4009fea3d3f3e6 | |
parent | 58b37aec94823aae047597593604c7f29d9e48fa (diff) |
Fixed cmark_node_get_list_start to return 0 for bullet lists...
as documented!
Closes #202.
-rw-r--r-- | api_test/main.c | 4 | ||||
-rw-r--r-- | src/blocks.c | 2 | ||||
-rw-r--r-- | src/node.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/api_test/main.c b/api_test/main.c index 17e1582..d720234 100644 --- a/api_test/main.c +++ b/api_test/main.c @@ -59,8 +59,8 @@ static void constructor(test_batch_runner *runner) { "default is list type is bullet"); INT_EQ(runner, cmark_node_get_list_delim(node), CMARK_NO_DELIM, "default is list delim is NO_DELIM"); - INT_EQ(runner, cmark_node_get_list_start(node), 1, - "default is list start is 1"); + INT_EQ(runner, cmark_node_get_list_start(node), 0, + "default is list start is 0"); INT_EQ(runner, cmark_node_get_list_tight(node), 0, "default is list is loose"); break; diff --git a/src/blocks.c b/src/blocks.c index 6709ecd..98868d3 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -414,7 +414,7 @@ static bufsize_t parse_list_marker(cmark_mem *mem, cmark_chunk *input, data->marker_offset = 0; // will be adjusted later data->list_type = CMARK_BULLET_LIST; data->bullet_char = c; - data->start = 1; + data->start = 0; data->delimiter = CMARK_NO_DELIM; data->tight = false; } else if (cmark_isdigit(c)) { @@ -85,7 +85,7 @@ cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem) { case CMARK_NODE_LIST: { cmark_list *list = &node->as.list; list->list_type = CMARK_BULLET_LIST; - list->start = 1; + list->start = 0; list->tight = false; break; } |