Skip to content

Instantly share code, notes, and snippets.

@budparr
Created January 30, 2015 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save budparr/520466094b47c4b867c2 to your computer and use it in GitHub Desktop.
Save budparr/520466094b47c4b867c2 to your computer and use it in GitHub Desktop.
Serial comma with Swig Templating Language: "x and y" or "x, y, and z" (not url specific to Webhook)
<a href="{{ url(object) }}">{{ object.name }}</a>{% if loop.revindex != 2 %}{% if not loop.last %}, {% endif %}{% endif %}{% if loop.revindex == 2 %} and {% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment