summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-11-25 15:54:27 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-11-25 15:54:27 -0800
commit7bc7581b22fbb2f77529a5ac9bca57ed1916bd32 (patch)
tree023a41962fbcd7142be5d5a31acc1a849675c3e6 /src/main.c
parent8ee6f28d2fe0d990da8bdd88579dcd8cc488d01b (diff)
Replaced cmark_debug_print with cmark_render_ast.
This returns a string.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 96e53ce..a7f18cb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,13 +19,13 @@ static void print_document(cmark_node *document, bool ast)
{
char *result;
if (ast) {
- cmark_debug_print(document);
+ result = cmark_render_ast(document);
} else {
result = cmark_render_html(document);
- printf("%s", result);
- free(result);
}
+ printf("%s", result);
+ free(result);
}
int main(int argc, char *argv[])