diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-06-25 13:01:19 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-06-25 13:01:19 +0000 |
commit | d9e74cd03217773097de0be523bacaf301db426d (patch) | |
tree | ebe21cfcb82dd9efc222b72f302fffae363828c9 /man_html.c | |
parent | 7ca688c5a3572d886f661dca84fbdb424ba13a5e (diff) | |
download | mandoc-d9e74cd03217773097de0be523bacaf301db426d.tar.gz mandoc-d9e74cd03217773097de0be523bacaf301db426d.tar.zst mandoc-d9e74cd03217773097de0be523bacaf301db426d.zip |
For -man -Thtml, ignore author-specified .HP widths because they
harm responsive design; use @media-dependent defaults instead.
Diffstat (limited to 'man_html.c')
-rw-r--r-- | man_html.c | 21 |
1 files changed, 5 insertions, 16 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.150 2018/05/25 20:23:51 schwarze Exp $ */ +/* $Id: man_html.c,v 1.151 2018/06/25 13:01:19 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> @@ -557,24 +557,13 @@ man_IP_pre(MAN_ARGS) static int man_HP_pre(MAN_ARGS) { - struct roffsu sum, sui; - const struct roff_node *np; - if (n->type == ROFFT_HEAD) return 0; - else if (n->type != ROFFT_BLOCK) - return 1; - - np = n->head->child; - - if (np == NULL || !a2width(np, &sum)) - SCALE_HS_INIT(&sum, INDENT); - sui.unit = sum.unit; - sui.scale = -sum.scale; - - print_bvspace(h, n); - print_otag(h, TAG_DIV, "csului", "Pp", &sum, &sui); + if (n->type == ROFFT_BLOCK) { + print_bvspace(h, n); + print_otag(h, TAG_DIV, "c", "HP"); + } return 1; } |