<commit_before>import os
from flask import request
from jinja2 import Environment, FileSystemLoader

import config
from . import kernel
from . import ignition

jinja = Environment(loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')), autoescape=False)


def render_template(template_name, node):
    context = {
        'node': node,
        'cluster': node.cluster,
        'url_root': request.url_root,
        'config': config,
    }

    return jinja.get_template(template_name).render(context)<commit_msg>don’t strip trainling newline from templates<commit_after>import os
from flask import request
from jinja2 import Environment, FileSystemLoader

import config
from . import kernel
from . import ignition

jinja = Environment(
    loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')),
    keep_trailing_newline=True,
    autoescape=False,
)


def render_template(template_name, node):
    context = {
        'node': node,
        'cluster': node.cluster,
        'url_root': request.url_root,
        'config': config,
    }

    return jinja.get_template(template_name).render(context)
{'fraction_non_alphanumeric': 0.10139860139860139, 'fraction_numerical': 0.0017482517482517483, 'mean_word_length': 4.134529147982063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2944720', 'n_tokens_mistral': 346, 'n_tokens_neox': 332, 'n_words': 80}