From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s8RAuJI9032727 for ; Sat, 27 Sep 2014 06:56:19 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s8RAuIL1028427; Sat, 27 Sep 2014 06:56:19 -0400 (EDT) Date: Sat, 27 Sep 2014 06:56:19 -0400 (EDT) Message-Id: <201409271056.s8RAuIL1028427@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Remove

in favour of

. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Remove

in favour of

. This is good because

is brittle: it can't appear within other block macros. This fixes a regression of the original HTML5 patch as noted by schwarze@ on the tech@ list, 14/8/2014. Modified Files: -------------- mdocml: html.c html.h man_html.c mdoc_html.c Revision Data ------------- Index: html.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.h,v retrieving revision 1.60 retrieving revision 1.61 diff -Lhtml.h -Lhtml.h -u -p -r1.60 -r1.61 --- html.h +++ html.h @@ -44,7 +44,6 @@ enum htmltag { TAG_DT, TAG_DD, TAG_BLOCKQUOTE, - TAG_P, TAG_PRE, TAG_B, TAG_I, @@ -144,6 +143,7 @@ void print_text(struct html *, const void print_tblclose(struct html *); void print_tbl(struct html *, const struct tbl_span *); void print_eqn(struct html *, const struct eqn *); +void print_paragraph(struct html *); #if __GNUC__ - 0 >= 4 __attribute__((__format__ (__printf__, 2, 3))) Index: man_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v retrieving revision 1.102 retrieving revision 1.103 diff -Lman_html.c -Lman_html.c -u -p -r1.102 -r1.103 --- man_html.c +++ man_html.c @@ -142,7 +142,7 @@ print_bvspace(struct html *h, const stru if (NULL == n->prev) return; - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); } void @@ -219,7 +219,7 @@ print_man_node(MAN_ARGS) * before printing the line's data. */ if ('\0' == *n->string) { - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); return; } @@ -538,7 +538,7 @@ man_IP_pre(MAN_ARGS) static int man_HP_pre(MAN_ARGS) { - struct htmlpair tag; + struct htmlpair tag[2]; struct roffsu su; const struct man_node *np; @@ -558,8 +558,9 @@ man_HP_pre(MAN_ARGS) bufcat_su(h, "margin-left", &su); su.scale = -su.scale; bufcat_su(h, "text-indent", &su); - PAIR_STYLE_INIT(&tag, h); - print_otag(h, TAG_P, 1, &tag); + PAIR_STYLE_INIT(&tag[0], h); + PAIR_CLASS_INIT(&tag[1], "spacer"); + print_otag(h, TAG_DIV, 2, tag); return(1); } Index: html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v retrieving revision 1.170 retrieving revision 1.171 diff -Lhtml.c -Lhtml.c -u -p -r1.170 -r1.171 --- html.c +++ html.c @@ -68,7 +68,6 @@ static const struct htmldata htmltags[TA {"dt", HTML_CLRLINE}, /* TAG_DT */ {"dd", HTML_CLRLINE}, /* TAG_DD */ {"blockquote", HTML_CLRLINE}, /* TAG_BLOCKQUOTE */ - {"p", HTML_CLRLINE | HTML_NOSTACK | HTML_AUTOCLOSE}, /* TAG_P */ {"pre", HTML_CLRLINE }, /* TAG_PRE */ {"b", 0 }, /* TAG_B */ {"i", 0 }, /* TAG_I */ @@ -203,7 +202,8 @@ print_gen_head(struct html *h) "td.head-rtitle, td.foot-os { text-align: right; }\n" "td.head-vol { text-align: center; }\n" "table.foot td { width: 50%; }\n" - "table.head td { width: 33%; }\n"); + "table.head td { width: 33%; }\n" + "div.spacer { margin: 1em 0; }\n"); print_tagq(h, t); if (h->style) { @@ -621,6 +621,18 @@ print_stagq(struct html *h, const struct free(tag); } } + +void +print_paragraph(struct html *h) +{ + struct tag *t; + struct htmlpair tag; + + PAIR_CLASS_INIT(&tag, "spacer"); + t = print_otag(h, TAG_DIV, 1, &tag); + print_tagq(h, t); +} + void bufinit(struct html *h) Index: mdoc_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v retrieving revision 1.205 retrieving revision 1.206 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.205 -r1.206 --- mdoc_html.c +++ mdoc_html.c @@ -314,11 +314,11 @@ synopsis_pre(struct html *h, const struc case MDOC_In: /* FALLTHROUGH */ case MDOC_Vt: - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); break; case MDOC_Ft: if (MDOC_Fn != n->tok && MDOC_Fo != n->tok) { - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); break; } /* FALLTHROUGH */ @@ -1156,7 +1156,7 @@ mdoc_bd_pre(MDOC_ARGS) break; } if ( ! comp) - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); return(1); } @@ -1562,7 +1562,7 @@ static int mdoc_pp_pre(MDOC_ARGS) { - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); return(0); } @@ -1890,7 +1890,7 @@ mdoc_rs_pre(MDOC_ARGS) return(1); if (n->prev && SEC_SEE_ALSO == n->sec) - print_otag(h, TAG_P, 0, NULL); + print_paragraph(h); PAIR_CLASS_INIT(&tag, "ref"); print_otag(h, TAG_SPAN, 1, &tag); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv