<commit_before>{% extends "base.xhtml" %}

{% block content %}

{% set repo = repository.name %}
{% set path = '/'.join(breadcrumbs) %}
{% set blob = repository.blob('/'.join([treeid]+breadcrumbs)) %}
{% set history = repository.history('/'.join([treeid]+breadcrumbs)) %}

<!-- MENU -->
<div class="menu">
    <h1>info</h1>
    <ul>
        <li>{{ blob.mime_type }}</li>
        <li>{{ blob.size|filesizeformat }}</li>
    </ul>
    <h1>actions</h1>
    <ul>
        <li><a href="{{ url_for('.blob', repository=repo, tree=treeid, path=path) }}">overview</a></li>
        <li><a href="{{ url_for('.blame', repository=repo, tree=treeid, path=path ) }}">blame</a></li>
        <li><a href="{{ url_for('.raw', repository=repo, tree=treeid, path=path) }}">raw</a></li>
    </ul>
</div>

<div class="content" style="margin-left: 150px;">
    <!-- CONTENT -->
    <h1>{{ path }}</h1>
    <div class="data">
{% if blob.mime_type is text %}
        <ol>
    {% for line in blob.data.split("\n") %}
            <li><p class="code">&nbsp;{{ line|force_unicode }}</p></li>
    {% endfor %}
        </ol>
{% else %}
        <p class="binary">binary data</p>
{% endif %}
    </div>

	<!-- HISTORY -->
	<h1>history</h1>
	<table cellspacing="0" cellpadding="0" width="100%" class="history">
	{% for item in history %}
		<tr>
			<td class="commit {{ loop.cycle('odd','even') }}"><code><a href="{{ url_for('.commit', repository=repo, tree=item.id) }}">{{ item.id|truncate(8, true, '') }}</a></code></td>
			<td class="author {{ loop.cycle('odd','even') }}" nowrap>{{ item.author.name }}</td>
			<td class="message {{ loop.cycle('odd','even') }}">{{ item.message|first_line|truncate(50) }}</td>
			<td class="date {{ loop.cycle('odd','even') }}" nowrap>{{ item.committed_date|dateformat }}</td>
		</tr>
	{% endfor %}
	</table>
</div>

<div style="clear: both;">&nbsp;</div>

{% endblock %}<commit_msg>BUGFIX: force unicode for author in blob view.<commit_after>{% extends "base.xhtml" %}

{% block content %}

{% set repo = repository.name %}
{% set path = '/'.join(breadcrumbs) %}
{% set blob = repository.blob('/'.join([treeid]+breadcrumbs)) %}
{% set history = repository.history('/'.join([treeid]+breadcrumbs)) %}

<!-- MENU -->
<div class="menu">
    <h1>info</h1>
    <ul>
        <li>{{ blob.mime_type }}</li>
        <li>{{ blob.size|filesizeformat }}</li>
    </ul>
    <h1>actions</h1>
    <ul>
        <li><a href="{{ url_for('.blob', repository=repo, tree=treeid, path=path) }}">overview</a></li>
        <li><a href="{{ url_for('.blame', repository=repo, tree=treeid, path=path ) }}">blame</a></li>
        <li><a href="{{ url_for('.raw', repository=repo, tree=treeid, path=path) }}">raw</a></li>
    </ul>
</div>

<div class="content" style="margin-left: 150px;">
    <!-- CONTENT -->
    <h1>{{ path }}</h1>
    <div class="data">
{% if blob.mime_type is text %}
        <ol>
    {% for line in blob.data.split("\n") %}
            <li><p class="code">&nbsp;{{ line|force_unicode }}</p></li>
    {% endfor %}
        </ol>
{% else %}
        <p class="binary">binary data</p>
{% endif %}
    </div>

	<!-- HISTORY -->
	<h1>history</h1>
	<table cellspacing="0" cellpadding="0" width="100%" class="history">
	{% for item in history %}
		<tr>
			<td class="commit {{ loop.cycle('odd','even') }}"><code><a href="{{ url_for('.commit', repository=repo, tree=item.id) }}">{{ item.id|truncate(8, true, '') }}</a></code></td>
			<td class="author {{ loop.cycle('odd','even') }}" nowrap>{{ item.author.name|force_unicode }}</td>
			<td class="message {{ loop.cycle('odd','even') }}">{{ item.message|first_line|truncate(50) }}</td>
			<td class="date {{ loop.cycle('odd','even') }}" nowrap>{{ item.committed_date|dateformat }}</td>
		</tr>
	{% endfor %}
	</table>
</div>

<div style="clear: both;">&nbsp;</div>

{% endblock %}
{'fraction_non_alphanumeric': 0.26475990553660456, 'fraction_numerical': 0.009971136184728419, 'mean_word_length': 3.6544566544566544, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, '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': '1522629', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1368, 'n_words': 273}