def visit_section(self, node): # insert the subnav after the section heading + optional lead if not self.is_partial and \ self.toc_subnav and \ self.page_toc and \ self.section_level == 0: index = 0 children = node.children if len(children) and isinstance(children[0], nodes.title): index = 1 if index and len(children) > 1 and 'lead' in children[1].get('classes'): index = 2 node.children.insert(index, self.page_toc) SphinxHTMLTranslator.visit_section(self, node)
def visit_section(self, node): # insert the subnav after the section heading + optional lead if not self.is_partial and \ self.toc_subnav and \ self.page_toc and \ self.section_level == 0: index = 0 children = node.children if len(children) and isinstance(children[0], nodes.title): index = 1 if index and len(children) > 1 and 'lead' in children[1].get( 'classes'): index = 2 node.children.insert(index, self.page_toc) SphinxHTMLTranslator.visit_section(self, node)
def visit_section(self, node): old_ids = node.get('ids', []) node['ids'] = ['s-' + i for i in old_ids] node['ids'].extend(old_ids) HTMLTranslator.visit_section(self, node) node['ids'] = old_ids
def visit_section(self, node): old_ids = node.get('ids', []) node['ids'] = ['s-' + i for i in old_ids] node['ids'].extend(old_ids) HTMLTranslator.visit_section(self, node) node['ids'] = old_ids
def visit_section(self, node): ids = node.get('ids') node['ids'] = [] HTMLTranslator.visit_section(self, node) node['ids'] = ids
def visit_section(self, node): old_ids = node.get("ids", []) node["ids"] = ["s-" + i for i in old_ids] node["ids"].extend(old_ids) HTMLTranslator.visit_section(self, node) node["ids"] = old_ids