diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 15:26:18 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 15:26:18 -0800 |
commit | 00ae2c61a47e09bb7643f0a7153c2009b7537e09 (patch) | |
tree | b5d07e1ad0d9950012951b6c69013a63722ff192 /src/cmark.h | |
parent | 70545251f4d1685a600e8eeb7b78eea430613b94 (diff) |
Added RAW_BLOCK and RAW_INLINE node types.
These are passed through verbatim by all writers, with no
escaping.
They are never generated by the parser, and do not correspond
to CommonMark elements. They are designed to be inserted by
filters that postprocess the AST. For example, a filter might
convert specially marked code blocks to svg diagrams in HTML
and tikz diagrams in LaTeX, passing these through to the renderer
as a RAW_BLOCK.
Diffstat (limited to 'src/cmark.h')
-rw-r--r-- | src/cmark.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmark.h b/src/cmark.h index 79bfbc5..612440f 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -40,6 +40,7 @@ typedef enum { CMARK_NODE_ITEM, CMARK_NODE_CODE_BLOCK, CMARK_NODE_HTML, + CMARK_NODE_RAW_BLOCK, CMARK_NODE_PARAGRAPH, CMARK_NODE_HEADER, CMARK_NODE_HRULE, @@ -53,6 +54,7 @@ typedef enum { CMARK_NODE_LINEBREAK, CMARK_NODE_CODE, CMARK_NODE_INLINE_HTML, + CMARK_NODE_RAW_INLINE, CMARK_NODE_EMPH, CMARK_NODE_STRONG, CMARK_NODE_LINK, @@ -158,6 +160,7 @@ CMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node); * of type: * * * CMARK_NODE_HTML + * * CMARK_NODE_RAW_BLOCK * * CMARK_NODE_HRULE * * CMARK_NODE_CODE_BLOCK * * CMARK_NODE_TEXT @@ -165,6 +168,7 @@ CMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node); * * CMARK_NODE_LINEBREAK * * CMARK_NODE_CODE * * CMARK_NODE_INLINE_HTML + * * CMARK_NODE_RAW_INLINE * * Nodes must only be modified after an `EXIT` event, or an `ENTER` event for * leaf nodes. @@ -514,6 +518,7 @@ const char *cmark_version_string(); #define NODE_ITEM CMARK_NODE_ITEM #define NODE_CODE_BLOCK CMARK_NODE_CODE_BLOCK #define NODE_HTML CMARK_NODE_HTML +#define NODE_RAW_BLOCK CMARK_NODE_RAW_BLOCK #define NODE_PARAGRAPH CMARK_NODE_PARAGRAPH #define NODE_HEADER CMARK_NODE_HEADER #define NODE_HRULE CMARK_NODE_HRULE @@ -522,6 +527,7 @@ const char *cmark_version_string(); #define NODE_LINEBREAK CMARK_NODE_LINEBREAK #define NODE_CODE CMARK_NODE_CODE #define NODE_INLINE_HTML CMARK_NODE_INLINE_HTML +#define NODE_RAW_INLINE CMARK_NODE_RAW_INLINE #define NODE_EMPH CMARK_NODE_EMPH #define NODE_STRONG CMARK_NODE_STRONG #define NODE_LINK CMARK_NODE_LINK |