Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Split out autorefs plugin, make it optional #220

Merged
merged 3 commits into from
Feb 4, 2021

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Jan 20, 2021

"autorefs" is now a self-sufficient MkDocs plugin, just allowing linking to headings on any page.

As for mkdocstrings, unless users opt into using autorefs for any heading (done by scanning the ToC as before), this will now only do autorefs to mkdocstrings identifiers.
Opting in is done by just enabling 'autorefs' as a separate plugin, which it now is.

The new behavior of linking only to identifiers is implemented by force-including the autorefs plugin even if it's not specified, but in a "subdued" mode. Idea inspired by the interaction between pymdownx.{superfences,highlight}.

"autorefs" is now a self-sufficient MkDocs plugin, just allowing linking to headings on any page.

As for mkdocstrings, unless users opt into using autorefs for any heading (done by scanning the ToC as before), this will now only do autorefs to mkdocstrings identifiers.
Opting in is done by just enabling 'autorefs' as a separate plugin, which it now is.

The new behavior of linking only to identifiers is implemented by force-including the autorefs plugin even if it's not specified, but in a "subdued" mode. Idea inspired by the interaction between pymdownx.{superfences,highlight}.
@pawamoy
Copy link
Member

pawamoy commented Feb 4, 2021

A rebase and some quality fixes (missing docstrings mostly), and we're good to go.

@pawamoy pawamoy mentioned this pull request Feb 4, 2021
4 tasks
@pawamoy
Copy link
Member

pawamoy commented Feb 4, 2021

OK, the tornado vulnerability can be fixed later with a dependency upgrade, lets' merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants