def auto_inline_code(self, node):
        """Try to automatically generate nodes for inline literals.

        Parameters
        ----------
        node : nodes.literal
            Original codeblock node
        Returns
        -------
        tocnode: docutils node
            The converted toc tree node, None if conversion is not possible.
        """
        assert isinstance(node, nodes.literal)
        if len(node.children) != 1:
            return None
        content = node.children[0]
        if not isinstance(content, nodes.Text):
            return None
        content = content.astext().strip()
        if content.startswith('$') and content.endswith('$'):
            if not self.config['enable_inline_math']:
                return None
            content = content[1:-1]
            self.state_machine.reset(self.document,
                                     node.parent,
                                     self.current_level)
            return self.state_machine.run_role('math', content=content)
        else:
            return None
Try to automatically generate nodes for inline literals.

        Parameters
        ----------
        node : nodes.literal
            Original codeblock node
        Returns
        -------
        tocnode: docutils node
            The converted toc tree node, None if conversion is not possible.