diff --git a/src/main.c b/src/main.c index 603c91e..08bf384 100644 --- a/src/main.c +++ b/src/main.c @@ -186,8 +186,8 @@ static void parse_linebreak(struct parser *p) { uint32_t lf = parser_getch(p); if (lf != '\n') { fprintf(p->output, "+"); + parser_pushch(p, lf); parser_pushch(p, plus); - parser_pushch(p, '\n'); return; } uint32_t ch = parser_getch(p); diff --git a/test/line-breaks b/test/line-breaks index c6c2fc4..e97332f 100755 --- a/test/line-breaks +++ b/test/line-breaks @@ -27,3 +27,11 @@ test(8) hello+world EOF end 0 + +begin "Leave double + without newline" +scdoc </dev/null +test(8) + +hello++world +EOF +end 0