[w3m-dev 03937] Re: <table> 内の無意味な <center> タグについて

Hironori SAKAMOTO <[email protected]>
Newsgroups gmane.comp.web.w3m.devel
Message-ID <[email protected]>

> From: SAKAI Kiyotaka <[email protected]>
>  html <table>  <center> 
>  w3m 
> 

<table>
<center>
  
<table>
<tr><td>
<center>

(<center> )


<center>,</center>,<div>,</div>,<p>,<br>,<nobr>,</nobr>,<wbr>


<table><img>  patch
----------------------------------- 
  <[email protected]> 
 http://www2u.biglobe.ne.jp/~hsaka/

diff -u table.c.orig table.c
--- table.c.orig	Fri Jun 27 16:59:50 2003
+++ table.c	Fri Jul 11 17:50:02 2003
@@ -2769,12 +2769,14 @@
 	return TAG_ACTION_NONE;
     case HTML_P:
     case HTML_BR:
-    case HTML_DT:
-    case HTML_DD:
     case HTML_CENTER:
     case HTML_N_CENTER:
     case HTML_DIV:
     case HTML_N_DIV:
+	if (!(tbl->flag & TBL_IN_ROW))
+	    break;
+    case HTML_DT:
+    case HTML_DD:
     case HTML_H:
     case HTML_N_H:
     case HTML_LI:
@@ -2822,9 +2824,11 @@
     case HTML_N_UL:
 	feed_table_block_tag(tbl, line, mode, -1, cmd);
 	break;
-    case HTML_PRE_INT:
     case HTML_NOBR:
     case HTML_WBR:
+	if (!(tbl->flag & TBL_IN_ROW))
+	    break;
+    case HTML_PRE_INT:
 	feed_table_inline_tag(tbl, line, mode, -1);
 	switch (cmd) {
 	case HTML_NOBR:
@@ -2847,6 +2851,8 @@
 	}
 	break;
     case HTML_N_NOBR:
+	if (!(tbl->flag & TBL_IN_ROW))
+	    break;
 	feed_table_inline_tag(tbl, line, mode, -1);
 	if (mode->nobr_level > 0)
 	    mode->nobr_level--;
@@ -2858,6 +2864,7 @@
 	mode->pre_mode &= ~TBLM_PRE_INT;
 	break;
     case HTML_IMG:
+	check_rowcol(tbl, mode);
 	w = tbl->fixed_width[tbl->col];
 	if (w < 0) {
 	    if (tbl->total_width > 0)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.