aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-03-23 11:30:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-03-23 11:30:48 +0000
commit27be359286baae838840a62e6c36dac6b91cd810 (patch)
tree87f12f3a4bef976671287f4d690faf2aabd0c0eb /man_html.c
parent32e373c8b9f15d8b28208b27247d3fd12f7235de (diff)
downloadmandoc-27be359286baae838840a62e6c36dac6b91cd810.tar.gz
mandoc-27be359286baae838840a62e6c36dac6b91cd810.tar.zst
mandoc-27be359286baae838840a62e6c36dac6b91cd810.zip
Support for pod2man standard header macros (Vb, Ve, Sp). Based largely on a set of patches by Ingo Schwarze.
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/man_html.c b/man_html.c
index 495a5fca..a759bd9d 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.28 2010/03/22 14:03:03 kristaps Exp $ */
+/* $Id: man_html.c,v 1.29 2010/03/23 11:30:48 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -103,6 +103,9 @@ static const struct htmlman mans[MAN_MAX] = {
{ man_ign_pre, NULL }, /* DT */
{ man_ign_pre, NULL }, /* UC */
{ man_ign_pre, NULL }, /* PD */
+ { man_br_pre, NULL }, /* Sp */
+ { man_ign_pre, NULL }, /* Vb */
+ { NULL, NULL }, /* Vi */
};
@@ -341,10 +344,18 @@ man_br_pre(MAN_ARGS)
SCALE_VS_INIT(&su, 1);
- if (MAN_sp == n->tok && n->child)
- a2roffsu(n->child->string, &su, SCALE_VS);
- else if (MAN_br == n->tok)
+ switch (n->tok) {
+ case (MAN_Sp):
+ SCALE_VS_INIT(&su, 0.5);
+ break;
+ case (MAN_sp):
+ if (n->child)
+ a2roffsu(n->child->string, &su, SCALE_VS);
+ break;
+ default:
su.scale = 0;
+ break;
+ }
bufcat_su(h, "height", &su);
PAIR_STYLE_INIT(&tag, h);