<commit_before>{% extends '@bolt/_base/_fieldset.twig' %}

{% set repeatfields = context.content.get('contentkey') %}


{% block fieldset_type 'repeater' %}
{% block fieldset_label_text  field.label %}
{% block fieldset_label_info  field.info|default('') %}
{% block fieldset_label_class 'col-xs-12' %}

{% block fieldset_controls %}
    {{ dump(field.fields) }}
    <script type="text/template">
        {% for rkey, rfield in field.fields %}
            {% include context.fields[rfield.type].template with {
                'key': rkey,
                'name': name ~ '[__index__][' ~ rkey ~ '][]',
                'contentkey': rkey
            } %}
        {% endfor %}
    </script>
    {% if not repeatfields.length %}
        {% for rkey, rfield in field.fields %}
            {% include context.fields[rfield.type].template with {
            'key': rkey,
            'name': name ~ '[0][' ~ rkey ~ ']',
            'contentkey': rkey
            } %}
        {% endfor %}
    {% endif %}
{% endblock fieldset_controls %}<commit_msg>pass the field into the template<commit_after>{% extends '@bolt/_base/_fieldset.twig' %}

{% set repeatfields = context.content.get('contentkey') %}


{% block fieldset_type 'repeater' %}
{% block fieldset_label_text  field.label %}
{% block fieldset_label_info  field.info|default('') %}
{% block fieldset_label_class 'col-xs-12' %}

{% block fieldset_controls %}
    {{ dump(field.fields) }}
    <script type="text/template">
        {% for rkey, rfield in field.fields %}
            {% include context.fields[rfield.type].template with {
                'key': rkey,
                'name': name ~ '[__index__][' ~ rkey ~ '][]',
                'contentkey': rkey,
                'field': rfield
            } %}
        {% endfor %}
    </script>
    {% if not repeatfields.length %}
        {% for rkey, rfield in field.fields %}
            {% include context.fields[rfield.type].template with {
                'key': rkey,
                'name': name ~ '[0][' ~ rkey ~ ']',
                'contentkey': rkey,
                'field': rfield
            } %}
        {% endfor %}
    {% endif %}
{% endblock fieldset_controls %}
{'fraction_non_alphanumeric': 0.1632278771205869, 'fraction_numerical': 0.002751031636863824, 'mean_word_length': 2.1440922190201728, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2227739', 'n_tokens_mistral': 721, 'n_tokens_neox': 639, 'n_words': 137}