<commit_before>extends submission/info_base

- load static from staticfiles
- load strings
- load i18n

block media
    style.
        .submission-info {
            text-align: right;
            float: right;
        }

        .submission-info .submission-date {
            color: gray;
        }

block body
    br
    div: a(href='{% url "submission_status" submission.id %}') {% trans "View status" %}
    div: a(href='{% url "submission_source_raw" submission.id %}') {% trans "View raw source" %}
    if request.user == submission.user.user or perms.judge.resubmit_other
        div: a(href='{% url "problem_submit" submission.problem.code submission.id %}') {% trans "Resubmit" %}
    if perms.judge.rejudge_submission
        div: form(action='{% url "submission_rejudge" %}', method='post')
            -csrf_token
            a(href='#', onclick='parentNode.submit();') {% trans "Rejudge" %}
            input(type='hidden', name='id', value=submission.id)
            input(type='hidden', name='path', value='{% url "submission_status" submission.id %}')

    hr(style='float:left;width:30%')
    br
    .source-wrap: table: tr
        td.source-ln: div
            for line in raw_source|split
                a(href='#line-{{ forloop.counter }}', name='line-{{ forloop.counter }}')
                    pre #{forloop.counter}
        td.source-code #{highlighted_source}<commit_msg>Line highlighting for #285<commit_after>extends submission/info_base

- load static from staticfiles
- load strings
- load i18n

block media
    style.
        .submission-info {
            text-align: right;
            float: right;
        }

        .submission-info .submission-date {
            color: gray;
        }

        pre.line {
            position: relative;
        }

        .highlighter {
            position: absolute;
            width: 9999px;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
        }

        a:active .line .highlighter {
            background: rgba(255, 212, 0, 0.48);
        }

block body
    br
    div: a(href='{% url "submission_status" submission.id %}') {% trans "View status" %}
    div: a(href='{% url "submission_source_raw" submission.id %}') {% trans "View raw source" %}
    if request.user == submission.user.user or perms.judge.resubmit_other
        div: a(href='{% url "problem_submit" submission.problem.code submission.id %}') {% trans "Resubmit" %}
    if perms.judge.rejudge_submission
        div: form(action='{% url "submission_rejudge" %}', method='post')
            -csrf_token
            a(href='#', onclick='parentNode.submit();') {% trans "Rejudge" %}
            input(type='hidden', name='id', value=submission.id)
            input(type='hidden', name='path', value='{% url "submission_status" submission.id %}')

    hr(style='float:left;width:30%')
    br
    .source-wrap: table: tr
        td.source-ln: div
            for line in raw_source|split
                a(href='#line-{{ forloop.counter }}', name='line-{{ forloop.counter }}')
                    pre.line
                        | #{forloop.counter}
                        .highlighter
        td.source-code #{highlighted_source}
{'fraction_non_alphanumeric': 0.14219041692594897, 'fraction_numerical': 0.009023024268823895, 'mean_word_length': 2.1396484375, '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': '1189460', 'n_tokens_mistral': 1031, 'n_tokens_neox': 944, 'n_words': 217}