<commit_before><%
    config.require("extension")
    config.require("contextModel")

    def applyMoustacheTemplate = { template, model ->
        model.each {
            template = template.replace("{{" + it.key + "}}", "" + it.value)
        }
        return template
    }
%>

<% if (config.extension.type == 'link') { %>
    <a href="/${ contextPath }/${ applyMoustacheTemplate(config.extension.url, config.contextModel) }"
        <% if (config.extension?.extensionParams?.linkId) { %> id="${ ui.escapeAttribute( config.extension.extensionParams.linkId) }" <% } %> >
        ${ ui.message(config.extension.label) }
    </a>
<% } %><commit_msg>RA-362 - Fragment that includes and renders all extensions for an extension point<commit_after><%
    config.require("extension")
    config.require("contextModel")
%>

<% if (config.extension.type == 'link' || config.extension.type == 'script') { %>
    <a href="${ config.extension.url(contextPath, config.contextModel) }"
        <% if (config.extension?.extensionParams?.linkId) { %> id="${ ui.escapeAttribute( config.extension.extensionParams.linkId) }" <% } %> >
        <% if (config.extension.icon) { %> <i class="${ config.extension.icon }"></i> <% } %>
        <% if (config.extension.label) { %> ${ ui.message(config.extension.label) } <% } %>
    </a>
<% } else if (config.extension.type == 'include-fragment') { %>
    <%= ui.includeFragment(config.extension.extensionParams.provider, config.extension.extensionParams.fragment, [ contextModel: config.contextModel ]) %>
<% } %>
{'fraction_non_alphanumeric': 0.19350649350649352, 'fraction_numerical': 0.001948051948051948, 'mean_word_length': 3.572700296735905, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 26, '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': '815005', 'n_tokens_mistral': 479, 'n_tokens_neox': 451, 'n_words': 75}