diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-12-04 16:55:04 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-12-04 16:55:04 +0000 |
commit | b061871474a3aefa9a428ac188fc709ad58dd641 (patch) | |
tree | 9a6ddffed654184b7fb178a6f11d3a0696ee2590 /file.c | |
parent | [w3m-dev 03521] sync option (diff) | |
download | w3m-b061871474a3aefa9a428ac188fc709ad58dd641.tar.gz w3m-b061871474a3aefa9a428ac188fc709ad58dd641.zip |
[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 (limited to 'file.c')
-rw-r--r-- | file.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.143 2002/12/03 15:47:39 ukai Exp $ */ +/* $Id: file.c,v 1.144 2002/12/04 16:55:06 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -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; |