summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-12 09:18:00 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-12 09:18:00 +0000
commit81a387c030a677e4c49c020a270294d21c564320 (patch)
tree5edd66188f498f18a740574c6d45f2d103ab9af4 /mdoc_term.c
parentc3b3cef562cad122a19ef12743ef5aa73df002b5 (diff)
downloadmandoc-81a387c030a677e4c49c020a270294d21c564320.tar.gz
`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.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 6bdfa3c9..5a8c7ddc 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -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);
}