Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 2eb5903965
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (13 sloc) 0.327 kB
import re
def deslugify(value):
"""
Cleans up a slug by removing slug separator characters that occur at the
beginning or end of a slug.
"""
reverse_map = {
"_" : " ",
"-" : " : ",
}
for _from, _to in reverse_map.iteritems():
value = re.sub(_from, _to, value)
return value
Jump to Line
Something went wrong with that request. Please try again.