djdb/search.py
def _scrub_char(c):
    """Normalize a character for use in indexing and searching.
    
    Among other things, this removes diacritics and strips out punctuation.
    """
    c = c.lower()
    if unicodedata.category(c)[0] in ("L", "N"):
        c = unicodedata.normalize("NFD", c)[0]
        return _CHARACTER_NORMALIZATIONS.get(c, c)
    elif c == "'":
        # Filter out apostrophes, so "foo's" will become "foos".
        return ""
    else:
        # Other types of characters are replaced by whitespace.
        return " "
Normalize a character for use in indexing and searching.
    
    Among other things, this removes diacritics and strips out punctuation.
    
Normalize a character for use in indexing and searching.
Among other things, this removes diacritics and strips out punctuation.
Normalize a character for use in indexing and searching . Among other things this removes diacritics and strips out punctuation .
def _scrub_char(c):
    c = c.lower()
    if unicodedata.category(c)[0] in ("L", "N"):
        c = unicodedata.normalize("NFD", c)[0]
        return _CHARACTER_NORMALIZATIONS.get(c, c)
    elif c == "'":
        return ""
    else:
        return " "
def _scrub_char ( c ) : c = c . lower ( ) if unicodedata . category ( c ) [ 0 ] in ( "L" , "N" ) : c = unicodedata . normalize ( "NFD" , c ) [ 0 ] return _CHARACTER_NORMALIZATIONS . get ( c , c ) elif c == "'" : return "" else : return " "
Normalize a character for use in indexing and searching.
Normalize a character for use in indexing and searching .
"""Normalize a character for use in indexing and searching.
    
    Among other things, this removes diacritics and strips out punctuation.
    """ # Filter out apostrophes, so "foo's" will become "foos". # Other types of characters are replaced by whitespace.
c