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

Indented ::: mkdocs-click blocks are not picked up #67

Open
pawamoy opened this issue Sep 6, 2023 · 0 comments
Open

Indented ::: mkdocs-click blocks are not picked up #67

pawamoy opened this issue Sep 6, 2023 · 0 comments

Comments

@pawamoy
Copy link

pawamoy commented Sep 6, 2023

Users of mkdocstrings noticed that indented mkdocs-click blocks are not picked up and handled by mkdocs-click, and later (block processors) mkdocstrings picks it up (we use the same syntax :::) and errors out since it do not support the rest of the syntax.

Would it be possible to loosen a bit the regex to match blocks starting with spaces?

The alternative is to implement the processor as a block processor rather than a pre-processor, and indentation will be handled for you automatically. You'd just have to make sure to keep using a higher priority than mkdocstrings, since you match the contents after ::: more specifically (strictly equal to mkdocs-click in your case, while mkdocstrings matches anything).

For reference, our block processor implementation:

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

No branches or pull requests

1 participant