tAdd escape possibility for everything. - pointtools - Simple point utilities to hold text presentations.
(HTM) git clone git://r-36.net/pointtools
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 0e58fcdb306d8383ead9eafdcd6666515a44ab50
(DIR) parent e1ccb875a3dd3576e285e1cf49b6ebd6e344f1ae
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Wed, 29 Apr 2020 19:21:25 +0200
Add escape possibility for everything.
Diffstat:
md2point.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/md2point.c b/md2point.c
t@@ -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;