Files
swift-cmark/extensions/table.h
Yuki Izumi 0445d10bbe Table extension from c068469 reworked
Note this includes a hack to the core code to escape pipes in the
'commonmark' renderer.  This is to fix test cases with the table
extension; i.e. we treat pipes as special characters that need escaping.

We use the cmark_mem of the parser in order to ensure we use the arena
allocator when necessary.  A very flexible table format is supported;
see test/extensions.txt for examples.  Leading and trailing pipes can be
omitted, and alignment specifiers can be used in the separator between
the header and body.  Table bodies don't need to be a consistent width.
Embedded HTML is OK.

Note we reuse the inline parser from cmark to parse tables -- this is to
ensure pipes e.g. in the middle of an inline code block don't
prematurely terminate a table cell.
2017-06-30 12:03:34 +10:00

9 lines
125 B
C

#ifndef TABLE_H
#define TABLE_H
#include "core-extensions.h"
cmark_syntax_extension *create_table_extension(void);
#endif