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

Adds pytest_markdown_docs_markdown_it for custom markdownit parser #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thomasjpfan
Copy link

Issue: Fixes #31

This PR adds a pytest_markdown_docs_markdown_it pytest hook to allow developers to customize the markdown_it parser. This means they can add plugins such as admon_plugin to the parser.

An alternative is to add something like https://github.com/modal-labs/pytest-markdown-docs/blob/main/src/pytest_markdown_docs/_runners.py, but using a pytest hook feels a little more natural with how pytest does things. For example, pytest-xdist has uses a pytest_xdist_make_scheduler to configure a custom scheduler:

https://github.com/pytest-dev/pytest-xdist/blob/f83299cd646965ac0560adddcf7204adde9f486e/src/xdist/newhooks.py#L96-L100

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.

Not compatible with mkdocs's admonition
1 participant