version 1.249, 2019/01/06 04:55:09 |
version 1.251, 2019/01/11 12:56:42 |
Line 272 html_close_paragraph(struct html *h) |
|
Line 272 html_close_paragraph(struct html *h) |
|
struct tag *t; |
struct tag *t; |
|
|
for (t = h->tag; t != NULL; t = t->next) { |
for (t = h->tag; t != NULL; t = t->next) { |
if (t->tag == TAG_P) { |
if (t->tag == TAG_P || t->tag == TAG_PRE) { |
print_tagq(h, t); |
print_tagq(h, t); |
break; |
break; |
} |
} |
Line 657 print_otag(struct html *h, enum htmltag tag, const cha |
|
Line 657 print_otag(struct html *h, enum htmltag tag, const cha |
|
print_encode(h, arg1, NULL, 1); |
print_encode(h, arg1, NULL, 1); |
fmt++; |
fmt++; |
break; |
break; |
case 'T': |
|
print_encode(h, arg1, NULL, 1); |
|
print_word(h, "\" title=\""); |
|
print_encode(h, arg1, NULL, 1); |
|
fmt++; |
|
break; |
|
default: |
default: |
print_encode(h, arg1, NULL, 1); |
print_encode(h, arg1, NULL, 1); |
break; |
break; |
Line 834 print_tagq(struct html *h, const struct tag *until) |
|
Line 828 print_tagq(struct html *h, const struct tag *until) |
|
|
|
while ((tag = h->tag) != NULL) { |
while ((tag = h->tag) != NULL) { |
print_ctag(h, tag); |
print_ctag(h, tag); |
if (until && tag == until) |
if (tag == until) |
return; |
return; |
} |
} |
} |
} |
|
|
|
/* |
|
* Close out all open elements up to but excluding suntil. |
|
* Note that a paragraph just inside stays open together with it |
|
* because paragraphs include subsequent phrasing content. |
|
*/ |
void |
void |
print_stagq(struct html *h, const struct tag *suntil) |
print_stagq(struct html *h, const struct tag *suntil) |
{ |
{ |
struct tag *tag; |
struct tag *tag; |
|
|
while ((tag = h->tag) != NULL) { |
while ((tag = h->tag) != NULL) { |
if (suntil && tag == suntil) |
if (tag == suntil || |
|
(tag->next == suntil && |
|
(tag->tag == TAG_P || tag->tag == TAG_PRE))) |
return; |
return; |
print_ctag(h, tag); |
print_ctag(h, tag); |
} |
} |
} |
|
|
|
void |
|
print_paragraph(struct html *h) |
|
{ |
|
struct tag *t; |
|
|
|
t = print_otag(h, TAG_DIV, "c", "Pp"); |
|
print_tagq(h, t); |
|
} |
} |
|
|
|
|