-
Notifications
You must be signed in to change notification settings - Fork 32
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
Exception raised with MyST / mardown-it renderer #196
Comments
I think the fix you're looking for is about
Where |
@2bndy5 thanks for your quick reply! You are right, if I change this code line to pass explicit string, then sphinx works: textnodes, messages = self.state.inline_text(str(title_text), self.lineno) |
A PR is welcome if you want to submit this yourself. |
Yes, I will provide a PR after some more testing. Seems that the source of the class type title text comes from
Could be sufficient to make this explicit string. |
I think that may be better yes. This was my first attempt at handling translated strings 😊 |
fix released with v0.11.2 |
I've changed from recommonmark to MyST renderer for markdown and now get an exception error if I try to create the documentation with sphix:
The stacktrace indicates an issue in the
mardown_it
package which is used bymyst_parse
The issue is that the
parseInline
function in themain.py
module ofmarkown-it-py
expects to receive a string type object but it seems to get asphinx.locale._TranslationProxy
instead from thesphinx_immaterial
extension.If I use a different theme like standard
alabaster
, then I don't get this issue and the document renders as expected.As a workaround I changed the string check in line 283 in
mardown-it-py
as below, it works.But I think the correct solution should be that this
sphinx-immaterial
theme correctly passes a string object to the markdown parser and not<class 'sphinx.locale._TranslationProxy'>
as it currently seems to do.The text was updated successfully, but these errors were encountered: