From 4570eb2bff2e1b71fa5b6408abbc69c98ff5ff24 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 22 Nov 2014 22:39:26 -0800 Subject: Revert "Remove distinction btw atx and setext header in AST." 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. --- api_test/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'api_test') diff --git a/api_test/main.c b/api_test/main.c index 8cf66af..4ee3546 100644 --- a/api_test/main.c +++ b/api_test/main.c @@ -17,7 +17,8 @@ static const cmark_node_type node_types[] = { CMARK_NODE_INDENTED_CODE, CMARK_NODE_HTML, CMARK_NODE_PARAGRAPH, - CMARK_NODE_HEADER, + CMARK_NODE_ATX_HEADER, + CMARK_NODE_SETEXT_HEADER, CMARK_NODE_HRULE, CMARK_NODE_REFERENCE_DEF, CMARK_NODE_STRING, @@ -47,7 +48,8 @@ constructor(test_batch_runner *runner) "get_type %d", type); switch (node->type) { - case CMARK_NODE_HEADER: + case CMARK_NODE_ATX_HEADER: + case CMARK_NODE_SETEXT_HEADER: INT_EQ(runner, cmark_node_get_header_level(node), 1, "default header level is 1"); node->as.header.level = 1; @@ -378,7 +380,8 @@ hierarchy(test_batch_runner *runner) (1 << CMARK_NODE_INDENTED_CODE) | (1 << CMARK_NODE_HTML) | (1 << CMARK_NODE_PARAGRAPH) | - (1 << CMARK_NODE_HEADER) | + (1 << CMARK_NODE_ATX_HEADER) | + (1 << CMARK_NODE_SETEXT_HEADER) | (1 << CMARK_NODE_HRULE) | (1 << CMARK_NODE_REFERENCE_DEF); int all_inlines = @@ -400,7 +403,8 @@ hierarchy(test_batch_runner *runner) test_content(runner, CMARK_NODE_INDENTED_CODE, 0); test_content(runner, CMARK_NODE_HTML, 0); test_content(runner, CMARK_NODE_PARAGRAPH, all_inlines); - test_content(runner, CMARK_NODE_HEADER, all_inlines); + test_content(runner, CMARK_NODE_ATX_HEADER, all_inlines); + test_content(runner, CMARK_NODE_SETEXT_HEADER, all_inlines); test_content(runner, CMARK_NODE_HRULE, 0); test_content(runner, CMARK_NODE_REFERENCE_DEF, 0); test_content(runner, CMARK_NODE_STRING, 0); -- cgit v1.2.3