From 0214fa880cd249945951f08bfcf80004d5e6f43f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 12 Jun 2009 09:18:00 +0000 Subject: `Lk' is correctly handled as CALLABLE (note groff munges nested output). `Mt' is now CALLABLE. Fixed missing validate/action of zero-element, non-called inline elements. Fixed missing validate/action of nested inline element re-calls. Fixed bogus column argv index in validator. --- mdoc_term.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 07aef10c..ec440962 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.11 2009/06/11 13:13:44 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.12 2009/06/12 09:18:00 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -2119,17 +2119,22 @@ termp_lk_pre(DECL_ARGS) assert(node->child); n = node->child; + if (NULL == n->next) { + TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_LINK_ANCHOR]); + return(1); + } + p->flags |= ttypes[TTYPE_LINK_ANCHOR]; term_word(p, n->string); - p->flags &= ~ttypes[TTYPE_LINK_ANCHOR]; p->flags |= TERMP_NOSPACE; term_word(p, ":"); + p->flags &= ~ttypes[TTYPE_LINK_ANCHOR]; p->flags |= ttypes[TTYPE_LINK_TEXT]; - for ( ; n; n = n->next) + for (n = n->next; n; n = n->next) term_word(p, n->string); - p->flags &= ~ttypes[TTYPE_LINK_TEXT]; + p->flags &= ~ttypes[TTYPE_LINK_TEXT]; return(0); } -- cgit v1.2.3-56-ge451