def hash_blocks(text, hashes):
def sub(match):<EOL><INDENT>block = match.group(<NUM_LIT:1>)<EOL>hashed = hash_text(block, '<STR_LIT>')<EOL>hashes[hashed] = block<EOL>return '<STR_LIT>' + hashed + '<STR_LIT>'<EOL><DEDENT>return re_block.sub(sub, text)<EOL>
Hashes HTML block tags.

    PARAMETERS:
    text   -- str; Markdown text
    hashes -- dict; a dictionary of all hashes, where keys are hashes
              and values are their unhashed versions.

    When HTML block tags are used, all content inside the tags is
    preserved as-is, without any Markdown processing. See block_tags
    for a list of block tags.