aboutsummaryrefslogtreecommitdiff
path: root/examples/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/main.c')
-rw-r--r--examples/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/main.c b/examples/main.c
index d28af79..6ab775f 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -9,7 +9,7 @@ void foo(char *v) {
for (int i = 0; i < doc.errors_len; i++) {
struct typdown_Error error = doc.errors[i];
printf("cannot parse '%s', error: %s (%d)\n", v, typdown_getErrorString(error.code), error.code);
- printf("%d to %d ", error.location.beg, error.location.end);
+ printf("line %d: ", error.location.line);
for (int j = error.location.beg; j < error.location.end; j++)
printf("%c", v[j]);
printf("\n");
@@ -18,7 +18,7 @@ void foo(char *v) {
return;
}
uint8_t code;
- char *res = typdown_renderHTML(doc, &code);
+ char *res = typdown_renderHTML(doc.root, &code);
if (code != 0) {
printf("cannot render '%s', error: %s (%d)\n", v, typdown_getErrorString(code), code);
typdown_free(doc);