From 70b71d1de24478a8fcc7413f1cb42c83db416bc3 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 6 Apr 2020 10:16:17 +0000 Subject: Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It. In HTML output, improve the logic for writing inside permalinks: skip them when there is no child content or when there is a risk that the children might contain flow content. --- roff.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'roff.c') diff --git a/roff.c b/roff.c index 70cf4f37..2de0b7c3 100644 --- a/roff.c +++ b/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.372 2020/04/03 11:35:01 schwarze Exp $ */ +/* $Id: roff.c,v 1.373 2020/04/06 10:16:17 schwarze Exp $ */ /* * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons @@ -1123,7 +1123,13 @@ roff_node_transparent(struct roff_node *n) return 0; if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) return 1; - switch (n->tok) { + return roff_tok_transparent(n->tok); +} + +int +roff_tok_transparent(enum roff_tok tok) +{ + switch (tok) { case ROFF_ft: case ROFF_ll: case ROFF_mc: -- cgit v1.2.3