diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2015-12-30 12:47:37 -0800 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-30 12:47:37 -0800 | 
| commit | 1f618253435bca44e269f2edf672424be88a68c4 (patch) | |
| tree | eabaa0d9ba2cdc817502a24f88b9a1e7040f3c2d | |
| parent | 1e43d6047c5c5e5246c392c2c57ae7f09bae004f (diff) | |
Allow both block and inline nodes as children of CUSTOM_BLOCK.
Closes #96.
| -rw-r--r-- | src/node.c | 4 | 
1 files changed, 3 insertions, 1 deletions
@@ -46,12 +46,14 @@ static bool S_can_contain(cmark_node *node, cmark_node *child) {    case CMARK_NODE_DOCUMENT:    case CMARK_NODE_BLOCK_QUOTE:    case CMARK_NODE_ITEM: -  case CMARK_NODE_CUSTOM_BLOCK:      return S_is_block(child) && child->type != CMARK_NODE_ITEM;    case CMARK_NODE_LIST:      return child->type == CMARK_NODE_ITEM; +  case CMARK_NODE_CUSTOM_BLOCK: +    return child->type != CMARK_NODE_ITEM; +    case CMARK_NODE_PARAGRAPH:    case CMARK_NODE_HEADING:    case CMARK_NODE_EMPH:  | 
