Skip to content

Commit c93ce2f

Browse files
authored
Merge pull request #18 from kivikakk/latest-upstream
Latest upstream
2 parents cceac56 + a24b1a9 commit c93ce2f

File tree

7 files changed

+518
-682
lines changed

7 files changed

+518
-682
lines changed

.github/workflows/stack.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: [push, pull_request]
2+
3+
name: build
4+
5+
jobs:
6+
haskell:
7+
name: Build and test
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- run: stack build
12+
- run: stack test

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ cabal-dev
99
.cabal-sandbox/
1010
cabal.sandbox.config
1111
cabal.config
12+
stack.yaml.lock

cbits/cmark-gfm-core-extensions.h

+24-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extern "C" {
77

88
#include "cmark-gfm-extension_api.h"
99
#include "cmark-gfm-extensions_export.h"
10+
#include "config.h" // for bool
1011
#include <stdint.h>
1112

1213
CMARK_GFM_EXTENSIONS_EXPORT
@@ -15,14 +16,36 @@ void cmark_gfm_core_extensions_ensure_registered(void);
1516
CMARK_GFM_EXTENSIONS_EXPORT
1617
uint16_t cmark_gfm_extensions_get_table_columns(cmark_node *node);
1718

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+
1824
CMARK_GFM_EXTENSIONS_EXPORT
1925
uint8_t *cmark_gfm_extensions_get_table_alignments(cmark_node *node);
2026

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+
2132
CMARK_GFM_EXTENSIONS_EXPORT
2233
int cmark_gfm_extensions_get_table_row_is_header(cmark_node *node);
2334

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+
*/
2447
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);
2649

2750
#ifdef __cplusplus
2851
}

0 commit comments

Comments
 (0)