/// Does the text have metadata?
bool mmd_engine_has_metadata(mmd_engine * e, size_t * end) {
bool result = false;
- if (!e || !end)
+ if (!e)
return false;
if (!(scan_meta_line(&e->dstr->str[0]))) {
if (doc->child && doc->child->type == BLOCK_META) {
result = true;
- if (end != NULL)
+ if (end)
*end = doc->child->len;
}
text->child->next->start--;
text->child->next->len++;
}
-
- mmd_export_token_tree_opendocument(out, source, text->child, scratch);
+
+ if (text)
+ mmd_export_token_tree_opendocument(out, source, text->child, scratch);
print_const("</text:a>");
}
void sub_asset_paths(DString * text, mmd_engine * e) {
long offset = 0;
- asset * a, * a_tmp;
+ asset * a;
token * t = e->root->child;
char destination[100] = "assets/";