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

Thebelab directive: Code highlighting not working properly? #191

Open
martinRenou opened this issue Dec 20, 2021 · 2 comments
Open

Thebelab directive: Code highlighting not working properly? #191

martinRenou opened this issue Dec 20, 2021 · 2 comments

Comments

@martinRenou
Copy link
Member

martinRenou commented Dec 20, 2021

When using the Thebelab button to make the code cells executable, I don't seem to be able to have syntax highlighting working properly.

thebe.mp4

I tried with a dev install (master branch) of jupyter-sphinx, and it seems that data-language is being set to "ipython" here:

return '<div class="{}" data-executable="true" data-language="{}">'.format(
This seems to be wrong and should be just "python", but even trying "python" locally does not work for me.

Do you have any pointers to how I could fix this? Could this be a Thebelab issue?


On another note, it looks like the font size changes when making the cells executable?

@martinRenou
Copy link
Member Author

I just realized there was a sphinx-thebe, where they seem to set the language to Python like this: https://github.com/executablebooks/sphinx-thebe/blob/master/sphinx_thebe/__init__.py#L109-L110

@martinRenou
Copy link
Member Author

I was able to get sphinx-thebe to work nicely with jupyter-sphinx, I commented on #165 as it's going more in the direction of replacing the current thebe extension from jupyter-sphinx

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