Hashes block quotes.

    Block quotes are defined to be lines that start with "> " (the
    space is not optional).

    All Markdown syntax in a blockquote is recursively converted,
    which allows (among other things) headers, codeblocks, and
    blockquotes to be used inside of blockquotes. The "> " is simply
    stripped from the front of any blockquote lines and the result is
    recursively converted.

def hash_blockquotes(text, hashes, markdown_obj):
    """Hashes block quotes.

    Block quotes are defined to be lines that start with "> " (the
    space is not optional).

    All Markdown syntax in a blockquote is recursively converted,
    which allows (among other things) headers, codeblocks, and
    blockquotes to be used inside of blockquotes. The "> " is simply
    stripped from the front of any blockquote lines and the result is
    recursively converted.
    """
    def sub(match):
        block = match.group(1).strip()
        block = re.sub(r'(?:(?<=\n)|(?<=\A))> ?', '', block)
        block = markdown_obj.convert(block)
        block = '<blockquote>{}</blockquote>'.format(block)
        hashed = hash_text(block, 'blockquote')
        hashes[hashed] = block
        return '\n\n' + hashed + '\n\n'
    return re_blockquote.sub(sub, text)