Hyphenise tags which contain spaces

@brigaill, Try the following:

// default.md

taxonomy:
  tag: [a, b, hyphenate me, c]
// Twig

{% set tags = [] %}

{# Step 1: Hyphenise each tag and add to array of tags #}
{% for tag in page.taxonomy.tag %}
    {% set hyphenisedTag = tag|hyphenize %}
    {% set tags = tags|merge([hyphenisedTag]) %}
{% endfor %}

{# Step 2: Join array of hyphenised tags #}
{% set filter = tags|join(' ') %}
<li data-filter="{{ filter }}"></li>
// Generated HTML

<li data-filter="a b hyphenate-me c"></li>