def add_sidenotes(html: str, toggle_class: str = "sidenote-toggle", label_class: str = "sidenote-number") -> str: counter: int = 0 start: int = html.find("[°") while start > -1: counter += 1 end: int = html.find("]", start) text: str = html[start + 2:end] sidenote: str = f"\n" +\ f"\n" +\ f"\n" +\ f" {text}\n" +\ f"\n" html = html[:start] + sidenote + html[end + 1:] start = html.find("[°", start + len(sidenote)) return html