def build_contents(self, node, level=0):
        sections = []
        i = len(node) - 1
        while i >= 0 and isinstance(node[i], nodes.section):
            sections.append(node[i])
            i -= 1
        sections.reverse()
        toc = []
        for section in sections:
            try:
                reference = nodes.reference('', '', refid=section['ids'][0], *section[0])
            except IndexError:
                continue
            ref_id = reference['refid']
            text = escape(reference.astext())
            toc.append((ref_id, text))

        self._generated_toc = [(href % '#%s', caption) for href, caption in toc]
        # no further processing
        return []
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Pygments-1.3.1/docs/generate.py/DocumentationWriter.build_contents/swapped operands of `%`