<commit_before>from django_markup.filter import MarkupFilter

class WidontMarkupFilter(MarkupFilter):
    title = 'Widont'

    def render(self, text, **kwargs):
        return '&nbsp'.join(text.rsplit(' ', 1))<commit_msg>Fixed a bug in the widont filter.<commit_after>from django_markup.filter import MarkupFilter

class WidontMarkupFilter(MarkupFilter):
    title = 'Widont'

    def render(self, text, **kwargs):
        return '&nbsp;'.join(text.strip().rsplit(' ', 1))
{'fraction_non_alphanumeric': 0.1331923890063425, 'fraction_numerical': 0.004228329809725159, 'mean_word_length': 4.710843373493976, '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': '7237315', 'n_tokens_mistral': 157, 'n_tokens_neox': 150, 'n_words': 35}