commit cb761902970ea449c0faa3c3cb969d06bd6488a6
parent 08468153a72b838b526b46c8caf0fbf36d7bd9cc
Author: ukai <ukai>
Date: Wed, 4 Dec 2002 16:55:04 +0000
[w3m-dev 03522] newline around <pre>..</pre>
* file.c (HTMLtagproc1): break before <pre>/after </pre> if necessary
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,10 @@
2002-12-05 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 03522] newline around <pre>..</pre>
+ * file.c (HTMLtagproc1): break before <pre>/after </pre> if necessary
+
+2002-12-05 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 03521] sync option
* display.c (redrawNLine): calcTabPos()
* func.c (initKeymap): return if keymap_initialized
diff --git a/file.c b/file.c
@@ -4321,10 +4321,15 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
close_anchor(h_env, obuf);
return 1;
case HTML_PRE:
- if (!parsedtag_exists(tag, ATTR_FOR_TABLE))
+ x = parsedtag_exists(tag, ATTR_FOR_TABLE);
+ if (!x)
CLOSE_P;
- if (!(obuf->flag & RB_IGNORE_P))
+ if (!(obuf->flag & RB_IGNORE_P)) {
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
+ if (!x)
+ do_blankline(h_env, obuf, envs[h_env->envc].indent, 0,
+ h_env->limit);
+ }
else
fillline(obuf, envs[h_env->envc].indent);
obuf->flag |= (RB_PRE | RB_IGNORE_P);
@@ -4332,6 +4337,11 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
return 1;
case HTML_N_PRE:
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
+ if (!(obuf->flag & RB_IGNORE_P)) {
+ do_blankline(h_env, obuf, envs[h_env->envc].indent, 0,
+ h_env->limit);
+ obuf->flag |= RB_IGNORE_P;
+ }
obuf->flag &= ~RB_PRE;
close_anchor(h_env, obuf);
return 1;