def _slugify(text, delim=u'<STR_LIT:->'):
result = []<EOL>for word in _punct_re.split(text.lower()):<EOL><INDENT>word = word.encode('<STR_LIT:utf-8>')<EOL>if word:<EOL><INDENT>result.append(word)<EOL><DEDENT><DEDENT>slugified = delim.join([i.decode('<STR_LIT:utf-8>') for i in result])<EOL>return re.sub('<STR_LIT>', replace_char, slugified).lower()<EOL>
Generates an ASCII-only slug.