def colorize_text(self, text):
        """Colorize the text."""
        # As originally implemented, this method acts upon all the contents of
        # the file as a single string using the MULTILINE option of the re
        # package. I believe this was ostensibly for performance reasons, but
        # it has a few side effects that are less than ideal. It's non-trivial
        # to avoid some substitutions based on other matches using this
        # technique, for example. In the case of block indents, e.g., backticks
        # that occur in the example ($ pwd is `pwd`) should not be escaped.
        # With the MULTILINE flag that is not simple. colorize_backticks() is
        # currently operating on a line by line basis and special casing for
        # this scenario. If these special cases proliferate, the line breaking
        # should occur here in order to minimize the number of iterations.

        result = text
        result = self.colorize_heading(result)
        result = self.colorize_block_indent(result)
        result = self.colorize_backticks(result)
        return result
Colorize the text.