version 1.171, 2019/02/28 16:36:13 |
version 1.172, 2019/03/01 10:57:18 |
Line 310 man_root_post(const struct roff_meta *man, struct html |
|
Line 310 man_root_post(const struct roff_meta *man, struct html |
|
static int |
static int |
man_SH_pre(MAN_ARGS) |
man_SH_pre(MAN_ARGS) |
{ |
{ |
char *id; |
const char *class; |
|
char *id; |
|
enum htmltag tag; |
|
|
|
if (n->tok == MAN_SH) { |
|
tag = TAG_H1; |
|
class = "Sh"; |
|
} else { |
|
tag = TAG_H2; |
|
class = "Ss"; |
|
} |
switch (n->type) { |
switch (n->type) { |
case ROFFT_BLOCK: |
case ROFFT_BLOCK: |
html_close_paragraph(h); |
html_close_paragraph(h); |
|
print_otag(h, TAG_SECTION, "c", class); |
break; |
break; |
case ROFFT_HEAD: |
case ROFFT_HEAD: |
id = html_make_id(n, 1); |
id = html_make_id(n, 1); |
if (n->tok == MAN_SH) |
print_otag(h, tag, "ci", class, id); |
print_otag(h, TAG_H1, "ci", "Sh", id); |
|
else |
|
print_otag(h, TAG_H2, "ci", "Ss", id); |
|
if (id != NULL) |
if (id != NULL) |
print_otag(h, TAG_A, "chR", "permalink", id); |
print_otag(h, TAG_A, "chR", "permalink", id); |
break; |
break; |