version 1.259, 2019/09/03 12:31:05 |
version 1.260, 2019/09/03 18:08:02 |
Line 590 print_otag(struct html *h, enum htmltag tag, const cha |
|
Line 590 print_otag(struct html *h, enum htmltag tag, const cha |
|
assert((htmltags[t->tag].flags & HTML_TOPHRASE) == 0); |
assert((htmltags[t->tag].flags & HTML_TOPHRASE) == 0); |
break; |
break; |
} |
} |
} |
|
|
|
|
/* |
|
* Always wrap phrasing elements in a paragraph |
|
* unless already contained in some flow container; |
|
* never put them directly into a section. |
|
*/ |
|
|
|
} else if (tflags & HTML_TOPHRASE && h->tag->tag == TAG_SECTION) |
|
print_otag(h, TAG_P, "c", "Pp"); |
|
|
/* Push this tag onto the stack of open scopes. */ |
/* Push this tag onto the stack of open scopes. */ |
|
|
if ((tflags & HTML_NOSTACK) == 0) { |
if ((tflags & HTML_NOSTACK) == 0) { |
Line 796 print_gen_comment(struct html *h, struct roff_node *n) |
|
Line 804 print_gen_comment(struct html *h, struct roff_node *n) |
|
void |
void |
print_text(struct html *h, const char *word) |
print_text(struct html *h, const char *word) |
{ |
{ |
|
/* |
|
* Always wrap text in a paragraph unless already contained in |
|
* some flow container; never put it directly into a section. |
|
*/ |
|
|
|
if (h->tag->tag == TAG_SECTION) |
|
print_otag(h, TAG_P, "c", "Pp"); |
|
|
|
/* Output whitespace before this text? */ |
|
|
if (h->col && (h->flags & HTML_NOSPACE) == 0) { |
if (h->col && (h->flags & HTML_NOSPACE) == 0) { |
if ( ! (HTML_KEEP & h->flags)) { |
if ( ! (HTML_KEEP & h->flags)) { |
if (HTML_PREKEEP & h->flags) |
if (HTML_PREKEEP & h->flags) |
Line 804 print_text(struct html *h, const char *word) |
|
Line 822 print_text(struct html *h, const char *word) |
|
} else |
} else |
print_word(h, " "); |
print_word(h, " "); |
} |
} |
|
|
|
/* |
|
* Print the text, optionally surrounded by HTML whitespace, |
|
* optionally manually switching fonts before and after. |
|
*/ |
|
|
assert(h->metaf == NULL); |
assert(h->metaf == NULL); |
print_metaf(h); |
print_metaf(h); |