=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.63 retrieving revision 1.67 diff -u -p -r1.63 -r1.67 --- mandoc/mdoc_term.c 2009/07/25 16:03:03 1.63 +++ mandoc/mdoc_term.c 2009/08/19 14:45:56 1.67 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.63 2009/07/25 16:03:03 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.67 2009/08/19 14:45:56 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -26,7 +26,8 @@ #include "term.h" #include "mdoc.h" -/* FIXME: macro arguments can be escaped. */ +#define INDENT 5 +#define HALFINDENT 3 #define TTYPE_PROG 0 #define TTYPE_CMD_FLAG 1 @@ -820,7 +821,7 @@ termp_it_pre(DECL_ARGS) /* * List-type can override the width in the case of fixed-head * values (bullet, dash/hyphen, enum). Tags need a non-zero - * offset. FIXME: double-check that correct. + * offset. */ switch (type) { @@ -1398,10 +1399,18 @@ termp_fd_post(DECL_ARGS) static int termp_sh_pre(DECL_ARGS) { - + /* + * XXX: undocumented: using two `Sh' macros in sequence has no + * vspace between calls, only a newline. + */ switch (node->type) { - case (MDOC_HEAD): + case (MDOC_BLOCK): + if (node->prev && MDOC_Sh == node->prev->tok) + if (NULL == node->prev->body->child) + break; term_vspace(p); + break; + case (MDOC_HEAD): pair->flag |= ttypes[TTYPE_SECTION]; break; case (MDOC_BODY):