Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ void print_usage() {
printf(" with two tildes\n");
printf(" --table-prefer-style-attributes Use style attributes to align table cells\n"
" instead of align attributes.\n");
printf(" --table-rowspan-ditto Use a double-quote 'ditto mark' to indicate\n"
" row span in tables instead of a caret.\n");
printf(" --full-info-string Include remainder of code block info\n"
" string in a separate attribute.\n");
printf(" --help, -h Print usage information\n");
Expand Down Expand Up @@ -167,6 +169,8 @@ int main(int argc, char *argv[]) {
options |= CMARK_OPT_FULL_INFO_STRING;
} else if (strcmp(argv[i], "--table-prefer-style-attributes") == 0) {
options |= CMARK_OPT_TABLE_PREFER_STYLE_ATTRIBUTES;
} else if (strcmp(argv[i], "--table-rowspan-ditto") == 0) {
options |= CMARK_OPT_TABLE_ROWSPAN_DITTO;
} else if (strcmp(argv[i], "--strikethrough-double-tilde") == 0) {
options |= CMARK_OPT_STRIKETHROUGH_DOUBLE_TILDE;
} else if (strcmp(argv[i], "--sourcepos") == 0) {
Expand Down
28 changes: 28 additions & 0 deletions extensions/include/cmark-gfm-core-extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,34 @@ int cmark_gfm_extensions_set_table_alignments(cmark_node *node, uint16_t ncols,
CMARK_GFM_EXTENSIONS_EXPORT
int cmark_gfm_extensions_get_table_row_is_header(cmark_node *node);

/** Sets the column span for the table cell, returning 1 on success and 0 on error.
*/
CMARK_GFM_EXTENSIONS_EXPORT
int cmark_gfm_extensions_set_table_cell_colspan(cmark_node *node, unsigned colspan);

/** Sets the row span for the table cell, returning 1 on success and 0 on error.
*/
CMARK_GFM_EXTENSIONS_EXPORT
int cmark_gfm_extensions_set_table_cell_rowspan(cmark_node *node, unsigned rowspan);

/**
Gets the column span for the table cell, returning \c UINT_MAX on error.

A value of 0 indicates that the cell is a "filler" cell, intended to be overlapped with a previous
cell with a span > 1.
*/
CMARK_GFM_EXTENSIONS_EXPORT
unsigned cmark_gfm_extensions_get_table_cell_colspan(cmark_node *node);

/**
Gets the row span for the table cell, returning \c UINT_MAX on error.

A value of 0 indicates that the cell is a "filler" cell, intended to be overlapped with a previous
cell with a span > 1.
*/
CMARK_GFM_EXTENSIONS_EXPORT
unsigned cmark_gfm_extensions_get_table_cell_rowspan(cmark_node *node);

/** Sets whether the node is a table header row, returning 1 on success and 0 on error.
*/
CMARK_GFM_EXTENSIONS_EXPORT
Expand Down
Loading