-
Notifications
You must be signed in to change notification settings - Fork 26
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
Unknown directive type "mdinclude" #15
Comments
I managed to solve the issue by downgrading sphinx to [tool.poetry.dev-dependencies]
-sphinx = "^3.3.1"
+sphinx = "3.2.1" The error also appears on sphinx |
Related to?: #13 |
No, it's a different problem, I had #13 too but I solved it by adding this to my """Patching m2r2"""
import m2r2
current_m2r2_setup = m2r2.setup
def patched_m2r2_setup(app):
try:
return current_m2r2_setup(app)
except (AttributeError):
app.add_source_suffix(".md", "markdown")
app.add_source_parser(m2r2.M2RParser)
return dict(
version=m2r2.__version__,
parallel_read_safe=True,
parallel_write_safe=True,
)
m2r2.setup = patched_m2r2_setup Also note that #13 has been patched, but the PR hasn't been merged yet. This mimics the patch that will (hopefully) been soon merged. |
Hi @cglacet! I was having similar errors from #13, then I saw this issue and I took your patch from I noticed the missing ...
except (AttributeError):
app.add_source_suffix(".md", "markdown")
app.add_source_parser(m2r2.M2RParser)
+ app.add_directive("mdinclude", m2r2.MdInclude)
return dict(
... With that, my docs built properly again. Since it was fixed directly on the patch, I feel this is related to #13 I hope this helps! |
IIUC, this can be closed, since the fix for #13 has already been merged, right? |
Version 0.2.5
I'm not too sure what I've done, this package used to work but now I get this error:
I can still convert files without any problem, but when I run sphinx (3.3.1) I get this error when using the
mdinclude
directive.Details about my install
I tried removing and adding m2r2 back but nothing seems to work.
How does m2r2 normally registers this new directive?
The text was updated successfully, but these errors were encountered: