def hash_footnote_reference(text, hashes, markdown_obj):
    """Hashes a footnote [^id] reference

    This function converts footnote styles:

        text here[^id]

    Footnotes can be defined anywhere in the Markdown text.
    """
    footnotes = markdown_obj.footnotes
    numbers = {f: i+1 for i, f in enumerate(footnotes)}
    def sub(match):
        footnote_id = match.group(1)
        if footnote_id not in footnotes:
            return ''
        number = numbers[footnote_id]
        result = '<sup><a href="#fnref-{0}">{0}</a></sup>'.format(number)
        hashed = hash_text(result, 'footnote')
        hashes[hashed] = result
        return hashed
    return re_footnote.sub(sub, text)