> This line produces the tag list: "+tiddler.tags+"
>
> That all works fine. Problem is that the list of tags is comma separated but
> without a space behind the comma.

Try this syntax in forEachTiddler:
   "+tiddler.tags.join(", ")+"

Here's what it does:

tiddler.tags refers to an *array* of individual tag values.  By
default, when an array is referenced as part of constructing a text
string (which is what forEachTiddler syntax is doing), it produces
comma-separated output without any extra spaces (as you've noted)
(e.g, an array of tags [a,b,c], produces text output "a,b,c").
Fortunately, you can achieve the output you want by using
the .join("...") method, which allows you to specify the desired
"separator text" to construct the intended text output from the n
array of values.   The separator you provide is automatically inserted
between array values to create a single combined text string.  Thus:

if tags contains [a,b,c], then
   tiddler.tags.join(", ")
will create a single text string:
   "a, b, c"
which is exactly what you want.

Q.E.D.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
----------
Was this answer useful? If so, please help support TiddlyTools:

   TiddlyTools direct contributions: (paypal)
      http://www.TiddlyTools.com/#Donate
   UnaMesa tax-deductible contributions:
      http://about.unamesa.org/Participate (paypal)
   TiddlyWiki consulting:
      http://www.TiddlyTools.com/#ELSDesignStudios
      http://www.TiddlyTools.com/#Contact

-- 
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