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:
We're also on Facebook:

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free