Skip to content

Commit

Permalink
refactor: Return all known anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy authored Dec 18, 2021
1 parent 831aabb commit 9bbfe14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mkdocstrings/handlers/python/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def render(self, data: CollectorItem, config: dict) -> str: # noqa: D102 (ignor
**{"config": final_config, data.kind.value: data, "heading_level": heading_level, "root": True},
)

def get_anchor(self, data: CollectorItem) -> str: # noqa: D102 (ignore missing docstring)
return data.path
def get_anchors(self, data: CollectorItem) -> list[str]: # noqa: D102 (ignore missing docstring)
return list({data.path, data.canonical_path, *data.aliases})

def update_env(self, md: Markdown, config: dict) -> None: # noqa: D102 (ignore missing docstring)
super().update_env(md, config)
Expand Down

0 comments on commit 9bbfe14

Please sign in to comment.