aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/file.c b/file.c
index 79f140a..0cf9b4e 100644
--- a/file.c
+++ b/file.c
@@ -4662,7 +4662,6 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
do_blankline(h_env, obuf, envs[h_env->envc].indent, 0,
h_env->limit);
}
- PUSH_ENV(cmd);
if (parsedtag_exists(tag, ATTR_COMPACT))
envs[h_env->envc].env = HTML_DL_COMPACT;
obuf->flag |= RB_IGNORE_P;
@@ -4754,15 +4753,14 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
return 1;
case HTML_DT:
CLOSE_A;
- if (h_env->envc == 0 ||
- (h_env->envc_real < h_env->nenv &&
- envs[h_env->envc].env != HTML_DL &&
- envs[h_env->envc].env != HTML_DL_COMPACT)) {
- PUSH_ENV(HTML_DL);
+ if (h_env->envc > 0 &&
+ (envs[h_env->envc].env == HTML_DL ||
+ envs[h_env->envc].env == HTML_DL_COMPACT)) {
+ POP_ENV;
}
- if (h_env->envc > 0) {
+ if (h_env->envc >= 0) {
flushline(h_env, obuf,
- envs[h_env->envc - 1].indent, 0, h_env->limit);
+ envs[h_env->envc].indent, 0, h_env->limit);
}
if (!(obuf->flag & RB_IN_DT)) {
HTMLlineproc1("<b>", h_env);
@@ -4770,6 +4768,14 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
}
obuf->flag |= RB_IGNORE_P;
return 1;
+ case HTML_N_DT:
+ if (!(obuf->flag & RB_IN_DT))
+ return 1;
+ obuf->flag &= ~RB_IN_DT;
+ HTMLlineproc1("</b>", h_env);
+ flushline(h_env, obuf, envs[h_env->envc].indent, 0,
+ h_env->limit);
+ return 1;
case HTML_DD:
CLOSE_A;
CLOSE_DT;
@@ -4790,6 +4796,14 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
/* obuf->flag |= RB_IGNORE_P; */
return 1;
+ case HTML_N_DD:
+ if (h_env->envc > 0 &&
+ (envs[h_env->envc].env == HTML_DL ||
+ envs[h_env->envc].env == HTML_DL_COMPACT)) {
+ POP_ENV;
+ flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
+ }
+ return 1;
case HTML_TITLE:
close_anchor(h_env, obuf);
process_title(tag);