From 3aaace71df52a8311f2e358e64b96fff63aa57f2 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 30 Jul 2014 17:06:26 +0000 Subject: Get rid of the useless FATAL error "child violates parent syntax". When finding items outside lists, simply skip them and throw an ERROR. Handle subsections before the first section instead of bailing out. --- mdoc_term.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 213ab4a0..42deb3ac 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.273 2014/07/30 00:19:16 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.274 2014/07/30 17:06:26 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -1770,6 +1770,9 @@ termp_ss_pre(DECL_ARGS) term_fontpush(p, TERMFONT_BOLD); p->offset = term_len(p, (p->defindent+1)/2); break; + case MDOC_BODY: + p->offset = term_len(p, p->defindent); + break; default: break; } @@ -1781,7 +1784,7 @@ static void termp_ss_post(DECL_ARGS) { - if (MDOC_HEAD == n->type) + if (n->type == MDOC_HEAD || n->type == MDOC_BODY) term_newln(p); } -- cgit v1.2.3