version 1.306, 2018/06/10 16:15:43 |
version 1.310, 2018/07/27 17:49:31 |
|
|
#include "html.h" |
#include "html.h" |
#include "main.h" |
#include "main.h" |
|
|
#define INDENT 5 |
|
|
|
#define MDOC_ARGS const struct roff_meta *meta, \ |
#define MDOC_ARGS const struct roff_meta *meta, \ |
struct roff_node *n, \ |
struct roff_node *n, \ |
struct html *h |
struct html *h |
Line 719 mdoc_it_pre(MDOC_ARGS) |
|
Line 717 mdoc_it_pre(MDOC_ARGS) |
|
break; |
break; |
case ROFFT_BODY: |
case ROFFT_BODY: |
if (n->child == NULL) { |
if (n->child == NULL) { |
print_otag(h, TAG_DD, "ss?", |
print_otag(h, TAG_DD, "s", "width", "auto"); |
"width", "auto"); |
|
print_text(h, "\\ "); |
print_text(h, "\\ "); |
} else |
} else |
print_otag(h, TAG_DD, ""); |
print_otag(h, TAG_DD, ""); |
|
|
mdoc_bl_pre(MDOC_ARGS) |
mdoc_bl_pre(MDOC_ARGS) |
{ |
{ |
char cattr[28]; |
char cattr[28]; |
struct tag *t; |
|
struct mdoc_bl *bl; |
struct mdoc_bl *bl; |
size_t i; |
|
enum htmltag elemtype; |
enum htmltag elemtype; |
|
|
bl = &n->norm->Bl; |
|
|
|
switch (n->type) { |
switch (n->type) { |
case ROFFT_BODY: |
case ROFFT_BODY: |
return 1; |
return 1; |
|
|
case ROFFT_HEAD: |
case ROFFT_HEAD: |
if (bl->type != LIST_column || bl->ncols == 0) |
|
return 0; |
|
|
|
/* |
|
* For each column, print out the <COL> tag with our |
|
* suggested width. The last column gets min-width, as |
|
* in terminal mode it auto-sizes to the width of the |
|
* screen and we want to preserve that behaviour. |
|
*/ |
|
|
|
t = print_otag(h, TAG_COLGROUP, ""); |
|
for (i = 0; i < bl->ncols - 1; i++) |
|
print_otag(h, TAG_COL, "sw+w", bl->cols[i]); |
|
print_otag(h, TAG_COL, "swW", bl->cols[i]); |
|
print_tagq(h, t); |
|
return 0; |
return 0; |
|
|
default: |
default: |
break; |
break; |
} |
} |
|
|
|
bl = &n->norm->Bl; |
switch (bl->type) { |
switch (bl->type) { |
case LIST_bullet: |
case LIST_bullet: |
elemtype = TAG_UL; |
elemtype = TAG_UL; |
Line 1195 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1172 mdoc_fn_pre(MDOC_ARGS) |
|
|
|
for (n = n->child->next; n; n = n->next) { |
for (n = n->child->next; n; n = n->next) { |
if (NODE_SYNPRETTY & n->flags) |
if (NODE_SYNPRETTY & n->flags) |
t = print_otag(h, TAG_VAR, "cTss?", "Fa", |
t = print_otag(h, TAG_VAR, "cTs", "Fa", |
"white-space", "nowrap"); |
"white-space", "nowrap"); |
else |
else |
t = print_otag(h, TAG_VAR, "cT", "Fa"); |
t = print_otag(h, TAG_VAR, "cT", "Fa"); |
Line 1436 mdoc_bf_pre(MDOC_ARGS) |
|
Line 1413 mdoc_bf_pre(MDOC_ARGS) |
|
cattr = "Bf No"; |
cattr = "Bf No"; |
|
|
/* Cannot use TAG_SPAN because it may contain blocks. */ |
/* Cannot use TAG_SPAN because it may contain blocks. */ |
print_otag(h, TAG_DIV, "cshl", cattr, 1); |
print_otag(h, TAG_DIV, "c", cattr); |
return 1; |
return 1; |
} |
} |
|
|