<commit_before>import logging

from django import template
from django.core.urlresolvers import reverse
from django.utils.encoding import force_text
from django.utils.html import escape

register = template.Library()
_LOG = logging.getLogger(__name__)


@register.simple_tag
def breadcrumb(title, url):
    '''
    Create a simple anchor with provided text and already-resolved URL.
    Example usage:
        {% breadcrumb "Title of breadcrumb" resolved_url %}
    '''
    return create_crumb(title, url)


@register.simple_tag
def breadcrumb_url(title, url_name):
    '''
    Add non-active breadcrumb with specified title.  Second argument should be
    a string name of URL that needs to be resolved.
    Example usage:
        {% breadcrumb_url "Title of breadcrumb" url_name %}
    '''
    url = reverse(url_name)
    return create_crumb(title, url)


@register.simple_tag
def breadcrumb_active(title):
    '''
    Add active breadcrumb, but not in an anchor.
    Example usage:
        {% breadcrumb_active "Title of breadcrumb" %}
    '''
    return create_crumb(title, url=None, active=True)
<commit_msg>Fix breadcrumbs to display Persons correctly<commit_after>import logging

from django import template
from django.core.urlresolvers import reverse
from django.utils.encoding import force_text
from django.utils.html import escape

register = template.Library()
_LOG = logging.getLogger(__name__)


@register.simple_tag
def breadcrumb(title, url):
    '''
    Create a simple anchor with provided text and already-resolved URL.
    Example usage:
        {% breadcrumb "Title of breadcrumb" resolved_url %}
    '''
    return create_crumb(title, url)


@register.simple_tag
def breadcrumb_url(title, url_name):
    '''
    Add non-active breadcrumb with specified title.  Second argument should be
    a string name of URL that needs to be resolved.
    Example usage:
        {% breadcrumb_url "Title of breadcrumb" url_name %}
    '''
    url = reverse(url_name)
    return create_crumb(title, url)


@register.simple_tag
def breadcrumb_active(title):
    '''
    Add active breadcrumb, but not in an anchor.
    Example usage:
        {% breadcrumb_active "Title of breadcrumb" %}
    '''
    return create_crumb(str(title), url=None, active=True)

{'fraction_non_alphanumeric': 0.08488063660477453, 'fraction_numerical': 0.0, 'mean_word_length': 3.7343096234309625, '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': '2962299', 'n_tokens_mistral': 675, 'n_tokens_neox': 657, 'n_words': 211}