diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 21:15:43 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 21:18:02 -0800 |
commit | b0a6c472f881a3e0a7b61722fb6fddbcc39e5139 (patch) | |
tree | 511cc8147fef48a302128eae05af1ff37c21d092 /src/node.h | |
parent | 774ac507fc7e86c6fe0d7b16a3c1abaed4849fab (diff) |
Changed API for CUSTOM_BLOCK and CUSTOM_INLINE.
Instead of using their `as.literal` content, we now
give each custom node *two* literal fields, one to
be printed on entering the node (before rendering
the children, if any), the other on exiting (after
rendering children).
This gives us the flexibility to have custom nodes
with children.
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -42,6 +42,11 @@ typedef struct { cmark_chunk title; } cmark_link; +typedef struct { + cmark_chunk on_enter; + cmark_chunk on_exit; +} cmark_custom; + struct cmark_node { struct cmark_node *next; struct cmark_node *prev; @@ -69,6 +74,7 @@ struct cmark_node { cmark_code code; cmark_header header; cmark_link link; + cmark_custom custom; int html_block_type; } as; }; |