diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -71,7 +71,7 @@ handle_file(const char *path) if (dot && strcmp(dot, ".md") == 0) { MMIOT *doc = mkd_string(buffer, size, 0); - template_write(base_template, NULL, out, doc, false); + template_write(base_template, NULL, out, doc, true); } else if (strlen(buffer) != 0) { list_t *content_headers = ingest(&buffer); template_write(base_template, content_headers, out, buffer, false); @@ -118,15 +118,14 @@ main(int argc, char **argv) printf("HANDLING: %s\n", filepath); handle_file(filepath); free(filepath); - - return EXIT_SUCCESS; } - /* for (x = (char **) md_resources; *x != NULL; x++) { */ - /* asprintf(&filepath, "%s.md", *x); */ - /* handle_file(filepath); */ - /* free(filepath); */ - /* } */ + for (x = (char **) md_resources; *x != NULL; x++) { + asprintf(&filepath, "%s.md", *x); + printf("HANDLING: %s\n", filepath); + handle_file(filepath); + free(filepath); + } return EXIT_SUCCESS; } |