def hash_codes(text, hashes):
def sub(match):<EOL><INDENT>code = '<STR_LIT>'.format(escape(match.group(<NUM_LIT:2>)))<EOL>hashed = hash_text(code, '<STR_LIT:code>')<EOL>hashes[hashed] = code<EOL>return hashed<EOL><DEDENT>return re_code.sub(sub, text)<EOL>
Hashes inline code tags.

    Code tags can begin with an arbitrary number of back-ticks, as long
    as the close contains the same number of back-ticks. This allows
    back-ticks to be used within the code tag.

    HTML entities (&, <, >, ", ') are automatically escaped inside the
    code tag.