scdoc2mdoc

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

commit 5dc80acebb20afb1317fbe4faa686fc4fc2aa916
parent f9051ab30af352f923845d3f1b8a4a0f1fde9ddc
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Thu,  4 Jul 2019 22:24:11 +1000

disallow invalid characters in document name

Makes using invalid chars in the name a fatal error.
Before this, "foo | bar(1)" would parse as "foobar(1)".
Modification of a patch by Zandr Martin <git@zandr.me>.

Diffstat:
Mparser.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/parser.c b/parser.c @@ -142,6 +142,8 @@ parse_preamble(struct parser *p) printf(".Dt %s %d\n", name->str, section); puts(".Os"); break; + } else { + parser_fatal(p, "Expected character in [A-Za-z0-9-]"); } }