@@ -7,6 +7,7 @@ extern "C" {
7
7
8
8
#include "cmark-gfm-extension_api.h"
9
9
#include "cmark-gfm-extensions_export.h"
10
+ #include "config.h" // for bool
10
11
#include <stdint.h>
11
12
12
13
CMARK_GFM_EXTENSIONS_EXPORT
@@ -15,14 +16,36 @@ void cmark_gfm_core_extensions_ensure_registered(void);
15
16
CMARK_GFM_EXTENSIONS_EXPORT
16
17
uint16_t cmark_gfm_extensions_get_table_columns (cmark_node * node );
17
18
19
+ /** Sets the number of columns for the table, returning 1 on success and 0 on error.
20
+ */
21
+ CMARK_GFM_EXTENSIONS_EXPORT
22
+ int cmark_gfm_extensions_set_table_columns (cmark_node * node , uint16_t n_columns );
23
+
18
24
CMARK_GFM_EXTENSIONS_EXPORT
19
25
uint8_t * cmark_gfm_extensions_get_table_alignments (cmark_node * node );
20
26
27
+ /** Sets the alignments for the table, returning 1 on success and 0 on error.
28
+ */
29
+ CMARK_GFM_EXTENSIONS_EXPORT
30
+ int cmark_gfm_extensions_set_table_alignments (cmark_node * node , uint16_t ncols , uint8_t * alignments );
31
+
21
32
CMARK_GFM_EXTENSIONS_EXPORT
22
33
int cmark_gfm_extensions_get_table_row_is_header (cmark_node * node );
23
34
35
+ /** Sets whether the node is a table header row, returning 1 on success and 0 on error.
36
+ */
37
+ CMARK_GFM_EXTENSIONS_EXPORT
38
+ int cmark_gfm_extensions_set_table_row_is_header (cmark_node * node , int is_header );
39
+
40
+ CMARK_GFM_EXTENSIONS_EXPORT
41
+ bool cmark_gfm_extensions_get_tasklist_item_checked (cmark_node * node );
42
+ /* For backwards compatibility */
43
+ #define cmark_gfm_extensions_tasklist_is_checked cmark_gfm_extensions_get_tasklist_item_checked
44
+
45
+ /** Sets whether a tasklist item is "checked" (completed), returning 1 on success and 0 on error.
46
+ */
24
47
CMARK_GFM_EXTENSIONS_EXPORT
25
- char * cmark_gfm_extensions_get_tasklist_state (cmark_node * node );
48
+ int cmark_gfm_extensions_set_tasklist_item_checked (cmark_node * node , bool is_checked );
26
49
27
50
#ifdef __cplusplus
28
51
}
0 commit comments