version 1.337, 2020/04/01 20:21:08 |
version 1.339, 2020/04/18 20:40:10 |
Line 377 print_mdoc_node(MDOC_ARGS) |
|
Line 377 print_mdoc_node(MDOC_ARGS) |
|
} |
} |
t = h->tag; |
t = h->tag; |
t->refcnt++; |
t->refcnt++; |
if (NODE_DELIMC & n->flags) |
if (n->flags & NODE_DELIMC) |
h->flags |= HTML_NOSPACE; |
h->flags |= HTML_NOSPACE; |
print_text(h, n->string); |
if (n->flags & NODE_HREF) |
if (NODE_DELIMO & n->flags) |
print_tagged_text(h, n->string, n); |
|
else |
|
print_text(h, n->string); |
|
if (n->flags & NODE_DELIMO) |
h->flags |= HTML_NOSPACE; |
h->flags |= HTML_NOSPACE; |
break; |
break; |
case ROFFT_EQN: |
case ROFFT_EQN: |
Line 741 mdoc_it_pre(MDOC_ARGS) |
|
Line 744 mdoc_it_pre(MDOC_ARGS) |
|
case ROFFT_HEAD: |
case ROFFT_HEAD: |
return 0; |
return 0; |
case ROFFT_BODY: |
case ROFFT_BODY: |
print_otag(h, TAG_LI, ""); |
print_otag_id(h, TAG_LI, NULL, n); |
break; |
break; |
default: |
default: |
break; |
break; |
Line 753 mdoc_it_pre(MDOC_ARGS) |
|
Line 756 mdoc_it_pre(MDOC_ARGS) |
|
case LIST_ohang: |
case LIST_ohang: |
switch (n->type) { |
switch (n->type) { |
case ROFFT_HEAD: |
case ROFFT_HEAD: |
print_otag(h, TAG_DT, ""); |
print_otag_id(h, TAG_DT, NULL, n); |
break; |
break; |
case ROFFT_BODY: |
case ROFFT_BODY: |
print_otag(h, TAG_DD, ""); |
print_otag(h, TAG_DD, ""); |
Line 765 mdoc_it_pre(MDOC_ARGS) |
|
Line 768 mdoc_it_pre(MDOC_ARGS) |
|
case LIST_tag: |
case LIST_tag: |
switch (n->type) { |
switch (n->type) { |
case ROFFT_HEAD: |
case ROFFT_HEAD: |
print_otag(h, TAG_DT, ""); |
print_otag_id(h, TAG_DT, NULL, n); |
break; |
break; |
case ROFFT_BODY: |
case ROFFT_BODY: |
if (n->child == NULL) { |
if (n->child == NULL) { |
Line 786 mdoc_it_pre(MDOC_ARGS) |
|
Line 789 mdoc_it_pre(MDOC_ARGS) |
|
print_otag(h, TAG_TD, ""); |
print_otag(h, TAG_TD, ""); |
break; |
break; |
default: |
default: |
print_otag(h, TAG_TR, ""); |
print_otag_id(h, TAG_TR, NULL, n); |
} |
} |
default: |
default: |
break; |
break; |
Line 852 mdoc_bl_pre(MDOC_ARGS) |
|
Line 855 mdoc_bl_pre(MDOC_ARGS) |
|
case LIST_tag: |
case LIST_tag: |
if (bl->offs) |
if (bl->offs) |
print_otag(h, TAG_DIV, "c", "Bd-indent"); |
print_otag(h, TAG_DIV, "c", "Bd-indent"); |
print_otag(h, TAG_DL, "c", bl->comp ? |
print_otag_id(h, TAG_DL, |
"Bl-tag Bl-compact" : "Bl-tag"); |
bl->comp ? "Bl-tag Bl-compact" : "Bl-tag", n->body); |
return 1; |
return 1; |
case LIST_column: |
case LIST_column: |
elemtype = TAG_TABLE; |
elemtype = TAG_TABLE; |
Line 866 mdoc_bl_pre(MDOC_ARGS) |
|
Line 869 mdoc_bl_pre(MDOC_ARGS) |
|
(void)strlcat(cattr, " Bd-indent", sizeof(cattr)); |
(void)strlcat(cattr, " Bd-indent", sizeof(cattr)); |
if (bl->comp) |
if (bl->comp) |
(void)strlcat(cattr, " Bl-compact", sizeof(cattr)); |
(void)strlcat(cattr, " Bl-compact", sizeof(cattr)); |
print_otag(h, elemtype, "c", cattr); |
print_otag_id(h, elemtype, cattr, n->body); |
return 1; |
return 1; |
} |
} |
|
|
Line 898 mdoc_d1_pre(MDOC_ARGS) |
|
Line 901 mdoc_d1_pre(MDOC_ARGS) |
|
switch (n->type) { |
switch (n->type) { |
case ROFFT_BLOCK: |
case ROFFT_BLOCK: |
html_close_paragraph(h); |
html_close_paragraph(h); |
break; |
return 1; |
case ROFFT_HEAD: |
case ROFFT_HEAD: |
return 0; |
return 0; |
case ROFFT_BODY: |
case ROFFT_BODY: |
return 1; |
break; |
default: |
default: |
abort(); |
abort(); |
} |
} |
print_otag(h, TAG_DIV, "c", "Bd Bd-indent"); |
print_otag_id(h, TAG_DIV, "Bd Bd-indent", n); |
if (n->tok == MDOC_Dl) |
if (n->tok == MDOC_Dl) |
print_otag(h, TAG_CODE, "c", "Li"); |
print_otag(h, TAG_CODE, "c", "Li"); |
return 1; |
return 1; |
Line 963 mdoc_bd_pre(MDOC_ARGS) |
|
Line 966 mdoc_bd_pre(MDOC_ARGS) |
|
strcmp(n->norm->Bd.offs, "left") != 0) |
strcmp(n->norm->Bd.offs, "left") != 0) |
(void)strlcat(buf, " Bd-indent", sizeof(buf)); |
(void)strlcat(buf, " Bd-indent", sizeof(buf)); |
|
|
print_otag(h, TAG_DIV, "c", buf); |
print_otag_id(h, TAG_DIV, buf, n); |
return 1; |
return 1; |
} |
} |
|
|
Line 1210 mdoc_pp_pre(MDOC_ARGS) |
|
Line 1213 mdoc_pp_pre(MDOC_ARGS) |
|
{ |
{ |
if (n->flags & NODE_NOFILL) { |
if (n->flags & NODE_NOFILL) { |
print_endline(h); |
print_endline(h); |
h->col = 1; |
if (n->flags & NODE_ID) |
print_endline(h); |
mdoc_tg_pre(meta, n, h); |
|
else { |
|
h->col = 1; |
|
print_endline(h); |
|
} |
} else { |
} else { |
html_close_paragraph(h); |
html_close_paragraph(h); |
print_otag(h, TAG_P, "c", "Pp"); |
print_otag(h, TAG_P, "ci", "Pp", |
|
n->flags & NODE_ID ? html_make_id(n, 1) : NULL); |
} |
} |
return 0; |
return 0; |
} |
} |