Eric

> Alternatively, here's some general-purpose code that first tries to
> split the text on the HR separator... and if only one item results
> (i.e., there are *no* HR separators in the text), then tries splitting
> on just a simple newline, allowing either format to be used, as
> appropriate:
>
>    var txt=store.getTiddlerText("$1","");
>    var items=txt.split("\n----\n");
>    if (!items[1]) items=txt.split("\n");

I tried to implement these line in the first script like this:
<script>
var out="";
var txt=store.getTiddlerText("$1","");
var items=txt.split("\n----\n"); {
if (!items[1]) items=txt.split("\n"); // start a new row
out += "|"+items[i]; // add item to row
}

out += "|\n"; // end last row
return out;
</script>

But I only get the first line/first cell of the table.
What would the working script look like?

YS Måns Mårtensson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to