summaryrefslogtreecommitdiff
path: root/src/commonmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commonmark.c')
-rw-r--r--src/commonmark.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index 4fbe9fd..635794c 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -280,9 +280,13 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
break;
case CMARK_NODE_HTML:
+ OUT(cmark_node_get_literal(node), false, LITERAL);
+ break;
+
case CMARK_NODE_CUSTOM_BLOCK:
BLANKLINE();
- OUT(cmark_node_get_literal(node), false, LITERAL);
+ OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
+ false, LITERAL);
BLANKLINE();
break;
@@ -337,10 +341,14 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
break;
case CMARK_NODE_INLINE_HTML:
- case CMARK_NODE_CUSTOM_INLINE:
OUT(cmark_node_get_literal(node), false, LITERAL);
break;
+ case CMARK_NODE_CUSTOM_INLINE:
+ OUT(entering ? cmark_node_get_on_enter(node) : cmark_node_get_on_exit(node),
+ false, LITERAL);
+ break;
+
case CMARK_NODE_STRONG:
if (entering) {
LIT("**");