def _code_block_sub(self, match, is_fenced_code_block=False):
        lexer_name = None
        if is_fenced_code_block:
            lexer_name = match.group(1)
            if lexer_name:
                formatter_opts = self.extras['fenced-code-blocks'] or {}
            codeblock = match.group(2)
            codeblock = codeblock[:-1]  # drop one trailing newline
        else:
            codeblock = match.group(1)
            codeblock = self._outdent(codeblock)
            codeblock = self._detab(codeblock)
            codeblock = codeblock.lstrip('\n')  # trim leading newlines
            codeblock = codeblock.rstrip()      # trim trailing whitespace

            # Note: "code-color" extra is DEPRECATED.
            if "code-color" in self.extras and codeblock.startswith(":::"):
                lexer_name, rest = codeblock.split('\n', 1)
                lexer_name = lexer_name[3:].strip()
                codeblock = rest.lstrip("\n")   # Remove lexer declaration line.
                formatter_opts = self.extras['code-color'] or {}

        if lexer_name:
            def unhash_code( codeblock ):
                for key, sanitized in list(self.html_spans.items()):
                    codeblock = codeblock.replace(key, sanitized)
                replacements = [
                    ("&amp;", "&"),
                    ("&lt;", "<"),
                    ("&gt;", ">")
                ]
                for old, new in replacements:
                    codeblock = codeblock.replace(old, new)
                return codeblock
            lexer = self._get_pygments_lexer(lexer_name)
            if lexer:
                codeblock = unhash_code( codeblock )
                colored = self._color_with_pygments(codeblock, lexer,
                                                    **formatter_opts)
                return colored % "\n\n%s\n\n"

        codeblock = self._encode_code(codeblock)
        pre_class_str = self._html_class_str_from_tag("pre")
        code_class_str = self._html_class_str_from_tag("code")
        return "\n\n<pre%s><code%s>%s\n</code></pre>\n\n" % (
            pre_class_str, code_class_str, codeblock)
dataset/ETHPy150Open an0/Letterpress/code/markdown2/lib/markdown2.py/Markdown._code_block_sub/swapped operands of `%`