summaryrefslogtreecommitdiff
path: root/src/commonmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commonmark.c')
-rw-r--r--src/commonmark.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index 654afc3..98fef5e 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -381,14 +381,13 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
return 1;
}
-// TODO parameter for wrap width or 0 for no wrap
-char *cmark_render_commonmark(cmark_node *root, int options)
+char *cmark_render_commonmark(cmark_node *root, int options, int width)
{
char *result;
cmark_strbuf commonmark = GH_BUF_INIT;
cmark_strbuf prefix = GH_BUF_INIT;
struct render_state state =
- { &commonmark, &prefix, 0, 65, 0, 0, true, false };
+ { &commonmark, &prefix, 0, width, 0, 0, true, false };
cmark_node *cur;
cmark_event_type ev_type;
cmark_iter *iter = cmark_iter_new(root);