size_t len //!< Len of token
);
+/// Duplicate an existing token
+token * token_copy(
+ token * original //!< Token to be copied
+);
+
/// Create a parent for a chain of tokens
token * token_new_parent(
token * child, //!< Pointer to child token chain
void recursive_parse_list_item(mmd_engine * e, token * block) {
+ token * marker = token_copy(block->child->child);
+
// Strip list marker from first line
token_remove_first_child(block->child);
deindent_block(e, block);
mmd_parse_token_chain(e, block);
+
+ // Insert marker back in place
+ marker->next = block->child->child;
+ block->child->child->prev = marker;
+ block->child->child = marker;
}