bug when rendering table headers

1 view
Skip to first unread message

chris...@gmail.com

unread,
Nov 9, 2009, 8:47:35 AM11/9/09
to WikklyText

At

http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/jsMath

you'll see a traceback produced by WikklyText 1.6.0 when rendering the
content of the jsMath plugin.

You can see the raw text at:

http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/jsMath.txt

A little bit of narrowing down suggests that it is table header
handling that's not happening. This page shows the error (small table
with header):

http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/wikklerror
http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/wikklerror.txt

This page shows a table with no header:

http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/tablecells
http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/tablecells.txt

This page show a table header being rendered as table cells, not
headers:

http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/tableheader
http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/tableheader.txt

The trailing h, used to identify a header, is being treated as a(n
unclosed) table cell.

Frank McIngvale

unread,
Nov 9, 2009, 12:08:12 PM11/9/09
to wikkl...@googlegroups.com
On Mon, Nov 9, 2009 at 7:47 AM, cd...@peermore.com <chris...@gmail.com> wrote:


At

 http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/jsMath

you'll see a traceback produced by WikklyText 1.6.0 when rendering the
content of the jsMath plugin.

You can see the raw text at:

 http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/jsMath.txt

A little bit of narrowing down suggests that it is table header
handling that's not happening.

This page show a table header being rendered as table cells, not
headers:

http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/tableheader
http://tiddlyweb.peermore.com/wiki/recipes/default/tiddlers/tableheader.txt

The trailing h, used to identify a header, is being treated as a(n
unclosed) table cell.

Ah ... okay, I don't think I knew about the trailing "h" case. Quick question before I try and fix this:

Is:
   |cellA|cellB|cellC|h

Equivalent to:
   |!cellA|!cellB|!cellC|

Or does the trailing "h" mean something else?

thanks
Frank
 



FND

unread,
Nov 9, 2009, 12:29:51 PM11/9/09
to wikkl...@googlegroups.com
> Is:
> |cellA|cellB|cellC|h
> Equivalent to:
> |!cellA|!cellB|!cellC|
> Or does the trailing "h" mean something else?

The former wraps the respective row in a THEAD element, whereas the
latter uses a TH element for the respective cell(s):

<table>
<thead>
<tr>
<td>cellA</td> <td>cellA</td> <td>cellA</td>
</tr>
</thead>
</table>

vs.

<table>
<tbody>
<tr>
<th>cellA</th> <th>cellA</th> <th>cellA</th>
</tr>
</tbody>
</table>


-- F.

Frank McIngvale

unread,
Nov 9, 2009, 12:40:10 PM11/9/09
to wikkl...@googlegroups.com

Ah OK. Hm, I need to check the HTML spec to understand the  semantic difference here -- just wondering if there's a way to fold one case into the other to simplify the backend?

thanks!
frank
 

-- F.



FND

unread,
Nov 9, 2009, 2:42:03 PM11/9/09
to wikkl...@googlegroups.com
> I need to check the HTML spec to understand the semantic difference here

This might be of use:
http://www.456bereastreet.com/archive/200410/bring_on_the_tables/

> just wondering if there's a way to fold one case into the other

I guess ignoring the THEAD issue and rendering "|foo|bar|h" as THs
instead should be fine.


-- F.

Frank McIngvale

unread,
Nov 9, 2009, 3:00:34 PM11/9/09
to wikkl...@googlegroups.com
On Mon, Nov 9, 2009 at 1:42 PM, FND <FN...@gmx.net> wrote:

> I need to check the HTML spec to understand the semantic difference here

This might be of use:
    http://www.456bereastreet.com/archive/200410/bring_on_the_tables/


Good info, thanks.
 
> just wondering if there's a way to fold one case into the other

I guess ignoring the THEAD issue and rendering "|foo|bar|h" as THs
instead should be fine.



I will probably do that since its a lot easier to change a flag in the individual table cell as it's being build vs. walking back up the tree and changing the whole row. I just checked and TiddlyWiki DOES make the THEAD when |h is used, and TH when not, so I'll make a TODO on emulating the TiddlyWiki behavior eventually in case it matters for someone.

thanks,
Frank

-- F.



Reply all
Reply to author
Forward
0 new messages