Table of contents with items separated by commas

Does anyone know if it's possible to separate repeater-created items in the table of contents by commas automatically? I've tried adding a <span class="comma">, </span> and .comma:last-of-type { display: none; }, but I'm pretty sure this is not going to work across the board, if at all.

My table of contents should look like this:
In this issue: Item 1, Item 2, Item 3, Item 4

With the last item not having a comma.

Thanks for any suggestions!

Mathew Mathew, 8 years ago

That's a challenge! You can obviously easily enough have the comma every time, but removing the last one is tricky.

Support for more advanced CSS like last-child and generated content is unlikely to be good enough.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free
1-888-533-8098