import re


def dashify(string, dash='–'):
    """Replace dashes with unicode dash."""
    try:
        try:
            return re.sub(r'-+', dash, string)
        except TypeError:
            return re.sub(r'-+', dash, string.content)
    except AttributeError:
        return re.sub(r'-+', dash, string.astext())