summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render.c9
-rw-r--r--src/render.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/render.c b/src/render.c
index fb49248..e1545ea 100644
--- a/src/render.c
+++ b/src/render.c
@@ -116,6 +116,15 @@ void S_out(cmark_renderer *renderer,
}
}
+// Assumes no newlines, assumes ascii content:
+void
+cmark_render_ascii(cmark_renderer* renderer, const char* s)
+{
+ int origsize = renderer->buffer->size;
+ cmark_strbuf_puts(renderer->buffer, s);
+ renderer->column += renderer->buffer->size - origsize;
+}
+
char*
cmark_render(cmark_node *root,
int options,
diff --git a/src/render.h b/src/render.h
index d050962..17728b6 100644
--- a/src/render.h
+++ b/src/render.h
@@ -40,6 +40,9 @@ struct cmark_renderer {
typedef struct cmark_renderer cmark_renderer;
+void
+cmark_render_ascii(cmark_renderer *renderer, const char* s);
+
char*
cmark_render(cmark_node *root,
int options,