Problem/Motivation
When formatting addresses that have additional punctuation that cannot be address be added/removed depending on the address passed.
eg.
100 Flinders St, Melbourne VIC 3000
So using the format of %address_line1%, %address_line2%, %locality% %administrative_area% %postal_code%
will actually end up with the following
100 Flinders St,, Melbourne VIC 3000
Proposed resolution
Adding Twig gives the formatter access to conditional blocks, which will allow the formatter to add additional content dependent on the data,
Using the formatter
{% if address_line1 %}{{ address_line1 }},{% endif %} {% if address_line2 %}{{ address_line2 }},{% endif %} {{ locality }} {{ administrative_area }} {{ postal_code }}
API changes
I have implemented this so the existing fields can be used, or alternatively you can use the twig fields.