scdoc2mdoc

A fork of scdoc to output mdoc(7)
git clone git://git.sgregoratto.me/scdoc2mdoc
Log | Files | Refs | README | LICENSE

commit ad035a30ccfbf5630bc1bc0f8ef7f6962da1a3c7
parent d8da572ac2bb100bd7182964c2804476bf5f70aa
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 10 Dec 2017 12:29:16 -0500

Don't start numbered list unless space present

Diffstat:
Msrc/main.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c @@ -321,7 +321,13 @@ static void parse_document(struct parser *p) { parse_list(p, &indent, -1); break; case '.': - parse_list(p, &indent, 1); + if ((ch = parser_getch(p)) == ' ') { + parser_pushch(p, ch); + parse_list(p, &indent, 1); + } else { + parser_pushch(p, ch); + parse_text(p); + } break; case '`': parse_literal(p, &indent);