Sorry I forgot the linebreak(\n):
<<forEachTiddler where 'tiddler.tags.containsAll
(["marcador",context.inTiddler.title])'
sortBy
'tiddler.title.toUpperCase()'
script
'
function getFirstLine(s) {
var m = s.match(/\s*(.*)/);
return m != null && m.length >= 1 ? m[1] : "";
}
'
write
'"*[["+tiddler.title+"]]→ "+getFirstLine(tiddler.text)+"\n"'>>
On May 9, 11:20 am, Måns <[email protected]> wrote:
> Hi Skye
>
> I don't know if this is the right way to do it - but it does
> "something"...(I'm not sure about how it writes the first lines though
> - if it does...):
> <<forEachTiddler where 'tiddler.tags.containsAll
> (["marcador",context.inTiddler.title])'
> sortBy
> 'tiddler.title.toUpperCase()'
> script
> '
> function getFirstLine(s) {
> var m = s.match(/\s*(.*)/);
> return m != null && m.length >= 1 ? m[1] : "";
> }
> '
> write
> '"*[["+tiddler.title+"]]→ "+getFirstLine(tiddler.text)+""'>>
>
> Regards Måns Mårtensson
>
> On May 9, 7:23 am, skye riquelme <[email protected]> wrote:
>
> > Hi All
>
> > Hope someone can help out with a simple syntax problem -
>
> > <<forEachTiddler where 'tiddler.tags.contains("marcador")
> > &&tiddler.tags.contains(store.getTiddlerSlice[tiddler.title])' sortBy
> > 'tiddler.title' script '
> > function getFirstLine(s) {
> > var m = s.match(/\s*(.*)/);
> > return m != null && m.length >= 1 ? m[1] : "";}
> > ' write
> > '"*[["+tiddler.title+"]] → "+getFirstLine(tiddler.text)+"\n"'>>
>
> > ----its meant to locate tiddlers tagged with "marcador" and also
> > tagged with the name of the tiddler where the FET is located!.
>
> > Still haven´t got my head around this syntax stuff
>
> > Thanks
>
> > Skye
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---