feat(parser): starting to believe in lists

This commit is contained in:
Jef Roosens 2024-03-18 22:53:39 +01:00
parent 82d5aa6078
commit f65942697e
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
3 changed files with 153 additions and 52 deletions

View file

@ -58,7 +58,7 @@ void test_parse_link() {
}
void test_parse_unordered_list() {
const char *buf = "* element one\n* element two\n paragraph in element two";
const char *buf = "* element one\n* element two\n\n paragraph in element two";
PARSER_OPEN(buf);
mrk_ast_node *list;
@ -94,8 +94,8 @@ void test_parse_unordered_list() {
TEST_CHECK(subchild->children.len == 1);
TEST_CHECK(subchild->children.arr[0]->type == mrk_ast_node_type_text);
TEST_CHECK(subchild->children.arr[0]->d.text.start == 31);
TEST_CHECK(subchild->children.arr[0]->d.text.end == 55);
TEST_CHECK(subchild->children.arr[0]->d.text.start == 33);
TEST_CHECK(subchild->children.arr[0]->d.text.end == 57);
}
TEST_LIST = {