'Encode/escape certain characters inside Markdown code runs.
The point is that in code, these characters are literals,
and lose their special Markdown meanings.'

def _encode_code(self, text):

    replacements = [('&', '&amp;'), ('<', '&lt;'), ('>', '&gt;')]
    for (before, after) in replacements:
        text = text.replace(before, after)
    hashed = _hash_text(text)
    self._escape_table[text] = hashed
    return hashed
