@@ -7,7 +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"
10
+ #include "config.h" // for bool
11
11
#include <stdint.h>
12
12
13
13
CMARK_GFM_EXTENSIONS_EXPORT
@@ -16,14 +16,36 @@ void cmark_gfm_core_extensions_ensure_registered(void);
16
16
CMARK_GFM_EXTENSIONS_EXPORT
17
17
uint16_t cmark_gfm_extensions_get_table_columns (cmark_node * node );
18
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
+
19
24
CMARK_GFM_EXTENSIONS_EXPORT
20
25
uint8_t * cmark_gfm_extensions_get_table_alignments (cmark_node * node );
21
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
+
22
32
CMARK_GFM_EXTENSIONS_EXPORT
23
33
int cmark_gfm_extensions_get_table_row_is_header (cmark_node * node );
24
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
+ */
25
47
CMARK_GFM_EXTENSIONS_EXPORT
26
- bool cmark_gfm_extensions_tasklist_state_is_checked (cmark_node * node );
48
+ int cmark_gfm_extensions_set_tasklist_item_checked (cmark_node * node , bool is_checked );
27
49
28
50
#ifdef __cplusplus
29
51
}
0 commit comments