"""Generate the navigation tree from Sphinx's toctree function's output.""" import functools from bs4 import BeautifulSoup def _get_navigation_expand_image(soup): retval = soup.new_tag("i", attrs={"class": "icon"}) svg_element = soup.new_tag("svg") svg_use_element = soup.new_tag("use", href="#svg-arrow-right") svg_element.append(svg_use_element) retval.append(svg_element) return retval @functools.lru_cache(maxsize=None) def get_navigation_tree(toctree_html): """Modify the given navigation tree, with furo-specific elements. Adds a checkbox + corresponding label to
  • s that contain a