diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-18 19:03:36 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-18 19:03:36 +0000 |
commit | aae27a21d3c4cec6e6fabd12fb23027c5ef5f244 (patch) | |
tree | 7506c9be8ca503ee5629e83925232b4c93a140e7 /man_html.c | |
parent | 8b811fac9808f46457e2e037bbd37d0e07ea798d (diff) | |
download | mandoc-aae27a21d3c4cec6e6fabd12fb23027c5ef5f244.tar.gz mandoc-aae27a21d3c4cec6e6fabd12fb23027c5ef5f244.tar.zst mandoc-aae27a21d3c4cec6e6fabd12fb23027c5ef5f244.zip |
Made sure devices and formats recognise that -man and -mdoc have different syntax for scaling widths: -mdoc assumes no unit means that the value is a string literal while -man instead uses the default vertical/horizontal scale.
Diffstat (limited to 'man_html.c')
-rw-r--r-- | man_html.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.10 2009/10/13 10:57:25 kristaps Exp $ */ +/* $Id: man_html.c,v 1.11 2009/10/18 19:03:36 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -222,7 +222,7 @@ a2width(const struct man_node *n, struct roffsu *su) if (MAN_TEXT != n->type) return(0); - if (a2roffsu(n->string, su)) + if (a2roffsu(n->string, su, SCALE_BU)) return(1); return(0); @@ -325,11 +325,9 @@ man_br_pre(MAN_ARGS) SCALE_VS_INIT(&su, 1); - if (MAN_sp == n->tok) { - su.scale = 1; - if (n->child) - a2roffsu(n->child->string, &su); - } else if (MAN_br == n->tok) + if (MAN_sp == n->tok && n->child) + a2roffsu(n->child->string, &su, SCALE_VS); + else if (MAN_br == n->tok) su.scale = 0; bufcat_su(h, "height", &su); |