diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2020-04-06 10:16:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2020-04-06 10:16:17 +0000 |
commit | 70b71d1de24478a8fcc7413f1cb42c83db416bc3 (patch) | |
tree | 03e1d4654d318e7f9e007d588173fcc2dbd59683 /roff.c | |
parent | e03f6c4421e6265e6c69f785a01edfe489ff4f9c (diff) | |
download | mandoc-70b71d1de24478a8fcc7413f1cb42c83db416bc3.tar.gz mandoc-70b71d1de24478a8fcc7413f1cb42c83db416bc3.tar.zst mandoc-70b71d1de24478a8fcc7413f1cb42c83db416bc3.zip |
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.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 <schwarze@openbsd.org> * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> @@ -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: |