<commit_before>- load staticfiles
- load markdown_trois_tags
- load mptt_tags
- load gravatar

ul.comments.top-level-comments
    if has_comments
        - var logged_in = request.user.is_authenticated
        if logged_in
            - var profile = request.user.profile
        - recursetree comment_list
            if not node.hidden
                li.comment(id='comment-{{ node.id }}')
                    .comment-box
                        div(style='float:left')
                            if request.user.is_authenticated
                                a.upvote-link.fa.fa-chevron-up.fa-fw(href='javascript:comment_upvote({{ node.id }})')
                            else
                                a.upvote-link.fa.fa-chevron-up.fa-fw(href='javascript:void(0)', title='Please login to vote')
                            br
                            .comment-score #{node.score}
                            if request.user.is_authenticated
                                a.downvote-link.fa.fa-chevron-down.fa-fw(href='javascript:comment_downvote({{ node.id }})')
                            else
                                a.downvote-link.fa.fa-chevron-down.fa-fw(href='javascript:void(0)', title='Please login to vote')
                            br
                        .comment-header
                            span.comment-info
                                span.comment-author
                                    img(src='{% gravatar_url node.author.user.email 24 node.author.mute %}', width='24', height='24')
                                    span(class=node.author.display_rank)
                                        a(href='{% url "user_page" node.author.user.username %}') #{node.author.user.username}
                                = ' on '
                                span.comment-time #{node.time|date:"N j, o, g:i a"}
                                if node.revisions > 1
                                    |  (
                                    span.comment-edited Edited
                                        if node.revisions > 2
                                            - var edited = node.revisions - 1
                                            = ' '
                                            = edited
                                            |  times
                                        else
                                            = 'once'
                                    | )
                                = ' '
                                span.comment-title #{node.title}
                            span.comment-spacer
                            span.comment-operation
                                a.comment-link(href='#comment-{{ node.id }}', title='Link')
                                    i.fa.fa-link.fa-fw
                                a.history-link(data-featherlight='{% url "comment_history_ajax" node.id %}',
                                               href='{% url "comment_history" node.id %}', title='History')
                                    i.fa.fa-history.fa-fw
                                if logged_in
                                    - var can_edit = node.author.id == profile.id and not profile.mute
                                    if can_edit
                                        a.edit-link(data-featherlight='{% url "comment_edit_ajax" node.id %}',
                                                    href='{% url "comment_edit" node.id %}', title='Edit')
                                            i.fa.fa-pencil.fa-fw
                                    else
                                        a(href='javascript:comment_set_parent({{ node.id }})', title='Reply')
                                            i.fa.fa-reply.fa-fw
                                    if perms.judge.change_comment
                                        if can_edit
                                            a(href='javascript:comment_set_parent({{ node.id }})', title='Reply')
                                                i.fa.fa-reply.fa-fw
                                        else
                                            a.edit-link(data-featherlight='{% url "comment_edit_ajax" node.id %}',<commit_msg>Simpler comment edit count. #61<commit_after>- load staticfiles
- load markdown_trois_tags
- load mptt_tags
- load gravatar

ul.comments.top-level-comments
    if has_comments
        - var logged_in = request.user.is_authenticated
        if logged_in
            - var profile = request.user.profile
        - recursetree comment_list
            if not node.hidden
                li.comment(id='comment-{{ node.id }}')
                    .comment-box
                        div(style='float:left')
                            if request.user.is_authenticated
                                a.upvote-link.fa.fa-chevron-up.fa-fw(href='javascript:comment_upvote({{ node.id }})')
                            else
                                a.upvote-link.fa.fa-chevron-up.fa-fw(href='javascript:void(0)', title='Please login to vote')
                            br
                            .comment-score #{node.score}
                            if request.user.is_authenticated
                                a.downvote-link.fa.fa-chevron-down.fa-fw(href='javascript:comment_downvote({{ node.id }})')
                            else
                                a.downvote-link.fa.fa-chevron-down.fa-fw(href='javascript:void(0)', title='Please login to vote')
                            br
                        .comment-header
                            span.comment-info
                                span.comment-author
                                    img(src='{% gravatar_url node.author.user.email 24 node.author.mute %}', width='24', height='24')
                                    span(class=node.author.display_rank)
                                        a(href='{% url "user_page" node.author.user.username %}') #{node.author.user.username}
                                = ' on '
                                span.comment-time #{node.time|date:"N j, o, g:i a"}
                                span.comment-title #{node.title}
                            span.comment-spacer
                            span.comment-operation
                                if node.revisions > 2
                                    span.comment-edits
                                        = node.revisions - 1
                                        |  edits
                                elif node.revisions > 1
                                    span.comment-edits edited
                                else
                                    span.comment-edits
                                a.comment-link(href='#comment-{{ node.id }}', title='Link')
                                    i.fa.fa-link.fa-fw
                                a.history-link(data-featherlight='{% url "comment_history_ajax" node.id %}',
                                               href='{% url "comment_history" node.id %}', title='History')
                                    i.fa.fa-history.fa-fw
                                if logged_in
                                    - var can_edit = node.author.id == profile.id and not profile.mute
                                    if can_edit
                                        a.edit-link(data-featherlight='{% url "comment_edit_ajax" node.id %}',
                                                    href='{% url "comment_edit" node.id %}', title='Edit')
                                            i.fa.fa-pencil.fa-fw
                                    else
                                        a(href='javascript:comment_set_parent({{ node.id }})', title='Reply')
                                            i.fa.fa-reply.fa-fw
                                    if perms.judge.change_comment
                                        if can_edit
                                            a(href='javascript:comment_set_parent({{ node.id }})', title='Reply')
                                                i.fa.fa-reply.fa-fw
                                        else
                                            a.edit-link(data-featherlight='{% url "comment_edit_ajax" node.id %}',
{'fraction_non_alphanumeric': 0.094706517824991, 'fraction_numerical': 0.0028808066258552397, 'mean_word_length': 0.8116981952598391, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 86, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5154489', 'n_tokens_mistral': 1906, 'n_tokens_neox': 1789, 'n_words': 300}