jquery-tmpl icon indicating copy to clipboard operation
jquery-tmpl copied to clipboard

Add space after comma

Open sindresorhus opened this issue 14 years ago • 2 comments

If I try to print an array, jQuery-tmpl automagically joins the strings with comma. The problem is the missing whitespace after comma. I would like "john, doe, is, unknown" instead of the current "john,doe,is,unknown".

sindresorhus avatar Aug 17 '11 08:08 sindresorhus

I put together a proof-of-concept for this issue on jsFiddle, though I am not sure how you set your template up for omitting the terminating comma.

As well, there is a work-around in there for getting by until a better solution is found. The work-around revolves around rendering some a string variable after each item, but it doesn't handle omitting the terminating comma either.

${$data}${", "}

patridge avatar Sep 20 '11 19:09 patridge

Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.

rdworth avatar Oct 08 '11 06:10 rdworth