<commit_before>{% set repeatfieldvals = context.content.get(contentkey) %}
{% set labelkey = field.label ?: key|ucfirst %}

{% set data_bolt_widget = {
    fieldRepeater: {
        minimum: 1,
        maximum: field.limit|default(0),
        name:    name,
    }
} %}

<fieldset class="bolt-field-repeater" data-bolt-widget="{{ data_bolt_widget|json_encode }}">
    <legend class="sr-only">{{ labelkey }}</legend>
    <label class="main col-xs-12">{{ labelkey }}</label>

    {# Prefix #}
    {% if field.prefix is defined and field.prefix is not empty %}
        <div class="prefix">
            {{ field.prefix|markdown }}
        </div>
    {% endif %}

    <div class="repeater-slot">
        <script type="text/template">
            {% set index = '#' %}
            {% include '@bolt/editcontent/fields/_repeater-group.twig' with { 'content': repeatfieldvals.emptySet , 'index': index} %}
        </script>

        {% for index, repeatfieldset in repeatfieldvals %}
            {% include '@bolt/editcontent/fields/_repeater-group.twig' with { 'content': repeatfieldset, 'index': index} %}
        {% endfor %}
    </div>

    <div class="repeater-add">
        <button type="button" class="btn btn-default add-button">
            <i class="fa fa-plus"></i> Add new {{ labelkey }} set
        </button>
    </div>
</fieldset>
<commit_msg>use the getEmptySet method<commit_after>{% set repeatfieldvals = context.content.get(contentkey) %}
{% set labelkey = field.label ?: key|ucfirst %}

{% set data_bolt_widget = {
    fieldRepeater: {
        minimum: 1,
        maximum: field.limit|default(0),
        name:    name,
    }
} %}

<fieldset class="bolt-field-repeater" data-bolt-widget="{{ data_bolt_widget|json_encode }}">
    <legend class="sr-only">{{ labelkey }}</legend>
    <label class="main col-xs-12">{{ labelkey }}</label>

    {# Prefix #}
    {% if field.prefix is defined and field.prefix is not empty %}
        <div class="prefix">
            {{ field.prefix|markdown }}
        </div>
    {% endif %}

    <div class="repeater-slot">
        <script type="text/template">
            {% set index = '#' %}
            {% include '@bolt/editcontent/fields/_repeater-group.twig' with { 'content': repeatfieldvals.getEmptySet , 'index': index} %}
        </script>

        {% for index, repeatfieldset in repeatfieldvals %}
            {% include '@bolt/editcontent/fields/_repeater-group.twig' with { 'content': repeatfieldset, 'index': index} %}
        {% endfor %}
    </div>

    <div class="repeater-add">
        <button type="button" class="btn btn-default add-button">
            <i class="fa fa-plus"></i> Add new {{ labelkey }} set
        </button>
    </div>
</fieldset>

{'fraction_non_alphanumeric': 0.16900369003690036, 'fraction_numerical': 0.002952029520295203, 'mean_word_length': 2.6438172043010755, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5004123', 'n_tokens_mistral': 903, 'n_tokens_neox': 832, 'n_words': 183}