summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Bartel <karl42@gmail.com>2019-09-29 18:16:00 +0200
committerEnno Boland <g@s01.de>2020-07-01 08:56:22 +0200
commita9636129ccb0ee70d2795ad05c41770ba57aae73 (patch)
treea9d0f566318d5fbb6ea389e3380152aa1920675c
parent1793559632596f3c8e587553f1d7c87036437fb7 (diff)
Keep HTML comments in output
See https://spec.commonmark.org/0.29/#example-621
-rw-r--r--smu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/smu.c b/smu.c
index 01ef239..2b9e8fc 100644
--- a/smu.c
+++ b/smu.c
@@ -148,6 +148,7 @@ docomment(const char *begin, const char *end, int newblock) {
p = strstr(begin, "-->");
if(!p || p + 3 >= end)
return 0;
+ fprintf(stdout, "%.*s\n", (int)(p + 3 - begin), begin);
return (p + 3 - begin) * (newblock ? -1 : 1);
}