summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-13 06:22:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-13 06:22:11 +0000
commit04007246b4661dffd30ad53faf1ef776be330dba (patch)
treef6db8cfbc99238f7655884f89a976d73dc43c701 /mdoc_html.c
parent94584327ed391203187fa593c8e0ff125dfd3979 (diff)
downloadmandoc-04007246b4661dffd30ad53faf1ef776be330dba.tar.gz
Fixed bug in -Thtml -mdoc where `Lb' would line-break in LIBRARY section.
Fixed assumption that parse-point == 1 equates to beginning of line (false if whitespace separates macro and control character). Fixed line-break for non-first-macro in several SYNOPSIS macros.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index ed72cbc6..bb109efa 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -729,7 +729,8 @@ mdoc_nm_pre(MDOC_ARGS)
{
struct htmlpair tag;
- if (SEC_SYNOPSIS == n->sec && n->prev) {
+ if (SEC_SYNOPSIS == n->sec &&
+ n->prev && MDOC_LINE & n->flags) {
bufcat_style(h, "clear", "both");
PAIR_STYLE_INIT(&tag, h);
print_otag(h, TAG_BR, 1, &tag);
@@ -1557,7 +1558,7 @@ mdoc_fd_pre(MDOC_ARGS)
struct htmlpair tag;
struct roffsu su;
- if (SEC_SYNOPSIS == n->sec) {
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) {
if (n->next && MDOC_Fd != n->next->tok) {
SCALE_VS_INIT(&su, 1);
bufcat_su(h, "margin-bottom", &su);
@@ -1605,7 +1606,7 @@ mdoc_ft_pre(MDOC_ARGS)
{
struct htmlpair tag;
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
print_otag(h, TAG_DIV, 0, NULL);
PAIR_CLASS_INIT(&tag, "ftype");
@@ -1626,7 +1627,7 @@ mdoc_fn_pre(MDOC_ARGS)
int sz, i;
struct roffsu su;
- if (SEC_SYNOPSIS == n->sec) {
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) {
SCALE_HS_INIT(&su, INDENT);
bufcat_su(h, "margin-left", &su);
su.scale = -su.scale;
@@ -1867,7 +1868,7 @@ mdoc_in_pre(MDOC_ARGS)
int i;
struct roffsu su;
- if (SEC_SYNOPSIS == n->sec) {
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) {
if (n->next && MDOC_In != n->next->tok) {
SCALE_VS_INIT(&su, 1);
bufcat_su(h, "margin-bottom", &su);
@@ -2172,7 +2173,7 @@ mdoc_lb_pre(MDOC_ARGS)
{
struct htmlpair tag;
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags)
print_otag(h, TAG_DIV, 0, NULL);
PAIR_CLASS_INIT(&tag, "lib");
print_otag(h, TAG_SPAN, 1, &tag);