<commit_before>{% if resource.media is not empty and app.request is defined %}
    {% set name = resource.media.name %}
    {% if name is empty %}
        {% set name = "Download"|trans %}
    {% endif %}

    <p class="download-pp">
        <a href="{{ app.request.schemeandhttphost ~ app.request.basePath ~ asset(resource.media.url) }}" target="_blank" class="download">{{ name }}</a>
        <span>| {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}</span>
    </p>
{% endif %}<commit_msg>Use absolute_url twig function instead of using app.request data<commit_after>{% if resource.media is not empty and app.request is defined %}
    {% set name = resource.media.name %}
    {% if name is empty %}
        {% set name = "Download"|trans %}
    {% endif %}

    <p class="download-pp">
        <a href="{{ absolute_url(asset(resource.media.url)) }}" target="_blank" class="download">{{ name }}</a>
        <span>| {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}</span>
    </p>
{% endif %}
{'fraction_non_alphanumeric': 0.18365384615384617, 'fraction_numerical': 0.0, 'mean_word_length': 3.3375, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6894931', 'n_tokens_mistral': 337, 'n_tokens_neox': 306, 'n_words': 82}