Skip to content

Commit

Permalink
fixup! feat: Add option to scan and register HTML anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 17, 2024
1 parent 3091b77 commit 88ce248
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mkdocs_autorefs/references.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def __init__(
"""Initialize the Markdown extension.
Parameters:
anchor_scanner_factory: A callable that returns an instance of the anchor scanner tree processor.
plugin: An optional reference to the autorefs plugin (to pass it to the anchor scanner tree processor).
**kwargs: Keyword arguments passed to the [base constructor][markdown.extensions.Extension].
"""
super().__init__(**kwargs)
Expand All @@ -262,6 +262,8 @@ def extendMarkdown(self, md: Markdown) -> None: # noqa: N802 (casing: parent me
"""Register the extension.
Add an instance of our [`AutoRefInlineProcessor`][mkdocs_autorefs.references.AutoRefInlineProcessor] to the Markdown parser.
Also optionally add an instance of our [`AnchorScannerTreeProcessor`][mkdocs_autorefs.references.AnchorScannerTreeProcessor]
to the Markdown parser if a reference to the autorefs plugin was passed to this extension.
Arguments:
md: A `markdown.Markdown` instance.
Expand Down

0 comments on commit 88ce248

Please sign in to comment.