Skip to content

Commit 6d60bfa

Browse files
Watson1978Ashe Connor
authored andcommitted
add tasklist extension (commonmark#94)
* add tasklist extension * recognize “+” as list marker * use long type to avoid warning in MSVC environment * recognize ordered list > Two list items are of the same type if they begin with a list marker of the same type. Two list markers are of the same type if (a) they are bullet list markers using the same character (-, +, or *) or (b) they are ordered list numbers with the same delimiter (either . or )). ( https://github.github.com/gfm/#task-list-items-extension- ) * add preliminary tests * fix regular extension tests * fix tasklist nesting
1 parent 02b19e0 commit 6d60bfa

File tree

9 files changed

+566
-3
lines changed

9 files changed

+566
-3
lines changed

extensions/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(LIBRARY_SOURCES
1010
ext_scanners.c
1111
ext_scanners.re
1212
ext_scanners.h
13+
tasklist.c
1314
)
1415

1516
include_directories(

extensions/core-extensions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "strikethrough.h"
44
#include "table.h"
55
#include "tagfilter.h"
6+
#include "tasklist.h"
67
#include "registry.h"
78
#include "plugin.h"
89

@@ -12,6 +13,7 @@ static int core_extensions_registration(cmark_plugin *plugin) {
1213
create_strikethrough_extension());
1314
cmark_plugin_register_syntax_extension(plugin, create_autolink_extension());
1415
cmark_plugin_register_syntax_extension(plugin, create_tagfilter_extension());
16+
cmark_plugin_register_syntax_extension(plugin, create_tasklist_extension());
1517
return 1;
1618
}
1719

0 commit comments

Comments
 (0)