From 0e58fcdb306d8383ead9eafdcd6666515a44ab50 Mon Sep 17 00:00:00 2001 From: Christoph Lohmann <20h@r-36.net> Date: Wed, 29 Apr 2020 19:21:25 +0200 Subject: [PATCH] Add escape possibility for everything. --- md2point.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/md2point.c b/md2point.c index 8785fa6..c366198 100644 --- a/md2point.c +++ b/md2point.c @@ -132,7 +132,14 @@ main(void) if (line[0] == '%') continue; - if (line[0] == '#' && line[1] == '#') { + if (line[0] == '\\') { + if (line[1] == '\0') + continue; + + /* ignore text before first header */ + if (fp) + fprintesc(fp, line+1); + } else if (line[0] == '#' && line[1] == '#') { if (fp) { fclose(fp); fp = NULL;