code: def _encode_code(self, text):
          
          replacements = [
              # Encode all ampersands; HTML entities are not
              # entities within a Markdown code span.
              ('&', '&amp;'),
              # Do the angle bracket song and dance:
              ('<', '&lt;'),
              ('>', '&gt;'),
          ]
          for before, after in replacements:
              text = text.replace(before, after)
          hashed = _hash_text(text)
          self._escape_table[text] = hashed
          return hashed
docs: Encode/escape certain characters inside Markdown code runs.
          The point is that in code, these characters are literals,
          and lose their special Markdown meanings.