def visit_section(self, node): if is_hidden_section(node): raise nodes.SkipNode # to avoid duplicated text if isinstance(node.parent, nodes.section): raise nodes.SkipNode
def visit_section(self, node): self.hide = is_hidden_section(node) if 'section' in node['classes']: classes = set(node['classes']) # avoid duplication of class added by html writer classes.remove('section') node['classes'] = list(classes) html4css1.HTMLTranslator.visit_section(self, node)