<commit_before>package com.stubbornjava.common.undertow;

import com.stubbornjava.common.Templating;

import io.undertow.server.HttpServerExchange;
import io.undertow.util.Headers;

public interface HtmlTemplateSender {

    default void sendRawHtmlTenplate(HttpServerExchange exchange, String rawTemplate, Object data) {
        exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/html");
        exchange.getResponseSender().send(Templating.instance().renderRawHtmlTemplate(rawTemplate, data));
    }

    default void sendHtmlTenplate(HttpServerExchange exchange, String templateName, Object data) {
        exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/html");
        exchange.getResponseSender().send(Templating.instance().renderHtmlTemplate(templateName, data));
    }
}<commit_msg>Annotate html sender<commit_after>package com.stubbornjava.common.undertow;

import com.stubbornjava.common.Templating;

import io.undertow.server.HttpServerExchange;
import io.undertow.util.Headers;

public interface HtmlTemplateSender {

    // {{start:sender}}
    default void sendRawHtmlTenplate(HttpServerExchange exchange, String rawTemplate, Object data) {
        exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/html");
        exchange.getResponseSender().send(Templating.instance().renderRawHtmlTemplate(rawTemplate, data));
    }

    default void sendHtmlTenplate(HttpServerExchange exchange, String templateName, Object data) {
        exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/html");
        exchange.getResponseSender().send(Templating.instance().renderHtmlTemplate(templateName, data));
    }
    // {{end:sender}}
}
{'fraction_non_alphanumeric': 0.10932857991681522, 'fraction_numerical': 0.0, 'mean_word_length': 5.452107279693487, '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': '4560115', 'n_tokens_mistral': 475, 'n_tokens_neox': 457, 'n_words': 74}