cmark

My personal build of CMark ✏️

Commit
2da6c9b98e1c5ab0c307a47f63c78e6d6c85543e
Parent
845bce401846732431f984907a0472e3f0fd8766
Author
John MacFarlane <jgm@berkeley.edu>
Date

Add options field to cmark_renderer.

This is an internal change, as this isn't part of the public API.

Diffstat

2 files changed, 3 insertions, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/render.c 3 2 1
Modified src/render.h 1 1 0
diff --git a/src/render.c b/src/render.c
@@ -159,7 +159,8 @@ char *cmark_render(cmark_node *root, int options, int width,
   char *result;
   cmark_iter *iter = cmark_iter_new(root);
 
-  cmark_renderer renderer = {mem,   &buf, &pref, 0,           width,
+  cmark_renderer renderer = {options,
+	                     mem,   &buf, &pref, 0,           width,
                              0,     0,    true,  true,        false,
                              false, outc, S_cr,  S_blankline, S_out};
 
diff --git a/src/render.h b/src/render.h
@@ -12,6 +12,7 @@ extern "C" {
 typedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping;
 
 struct cmark_renderer {
+  int options;
   cmark_mem *mem;
   cmark_strbuf *buffer;
   cmark_strbuf *prefix;