TiddlyWiki table header markup raises WikiError

1 view
Skip to first unread message

FND

unread,
Apr 6, 2009, 10:14:46 AM4/6/09
to WikklyText
Hello,

TiddlyWiki supports a special marker to indicate table headers:
|foo|bar|h
|lorem|ipsum|
(cf. http://tiddlywiki.org/wiki/TiddlyWiki_Markup#Tables)

WikklyText does not support this at the moment, resulting in a
"WikError: Bad TableCell" exception.

I took a brief look at the source (which I'm not at all familiar
with), and it seems a quick (and dirty) way to fix this would be to
adjust the following token:
t_TABLEROW_END = r"(\|\s*)\n" # normal end of table row
... to simply allow an optional trailing "h":
t_TABLEROW_END = r"(\|h?\s*)\n" # normal end of table row

Aside: I've noticed WikklyText is fairly lenient with regards to
leading and trailing whitespace around table rows. TiddlyWiki
currently* is much stricter in this regard.

Also, when running "pydoc wikklytext", there is no version number or
reference to the website. It would be nice if that information could
be added.


Thanks,

Fred


* http://trac.tiddlywiki.org/ticket/980

Frank McIngvale

unread,
Apr 6, 2009, 4:06:05 PM4/6/09
to wikkl...@googlegroups.com
On Mon, Apr 6, 2009 at 9:14 AM, FND <FN...@gmx.net> wrote:

Hello,

TiddlyWiki supports a special marker to indicate table headers:
   |foo|bar|h
   |lorem|ipsum|
(cf. http://tiddlywiki.org/wiki/TiddlyWiki_Markup#Tables)

WikklyText does not support this at the moment, resulting in a
"WikError: Bad TableCell" exception.

Yes, I think the caption is the only one I implemented. There are several that are tricky to implement but hopefully this one is not too bad. I'll add this to my TODO.

Aside: I've noticed WikklyText is fairly lenient with regards to
leading and trailing whitespace around table rows. TiddlyWiki
currently* is much stricter in this regard.

Right, WT will accept leading/trailing whitespace in many situations where TW does not. I've had it in the back of my mind that whitespace handling needs to be configurable, but for now you get the lenient behavior.


Also, when running "pydoc wikklytext", there is no version number or
reference to the website. It would be nice if that information could
be added.

Good point ... added to TODO.

WT has been "boringly stable" for a while, so I haven't made any releases, but I'll make a point to do a 1.6 to rollup the various fixes from 1.5. There are also some new additions to the plugin framework, and I wanted to make sure that API was stable for 1.6.

thanks ...
Frank

 

FND

unread,
Apr 6, 2009, 5:34:53 PM4/6/09
to WikklyText
Thanks for the quick response!

> WT has been "boringly stable" for a while, so I haven't made any releases,
> but I'll make a point to do a 1.6 to rollup the various fixes from 1.5.

Great, looking forward to it!

> WT will accept leading/trailing whitespace in many situations where
> TW does not. I've had it in the back of my mind that whitespace handling
> needs to be configurable, but for now you get the lenient behavior.

Personally, I think that's fine.
I wouldn't worry about it too much unless you get reports of someone
actually needing stricter handling...


-- F.
Reply all
Reply to author
Forward
0 new messages