(toc_tokens: list[_TocToken])
| 18 | |
| 19 | |
| 20 | def get_toc(toc_tokens: list[_TocToken]) -> TableOfContents: |
| 21 | toc = [_parse_toc_token(i) for i in toc_tokens] |
| 22 | # For the table of contents, always mark the first element as active |
| 23 | if len(toc): |
| 24 | toc[0].active = True # type: ignore[attr-defined] |
| 25 | return TableOfContents(toc) |
| 26 | |
| 27 | |
| 28 | class AnchorLink: |
searching dependent graphs…