-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feature: Mobile Optimized Codebocks + Language Interpretation #1045
Comments
Do you have some examples? I think that's mostly to do with pygmets (the lib is used to parse/lex different languages in code blocks) |
Correct, changes to add or improve different languages should be handled in https://pygments.org/ and sphinx. |
It is strange though, because pygments supports many of these languages, but unsure why they are rendering in GitHub but not in the readthedocs. Is it a problem tied to sphinx or this theme? Though, I would be interested in the other issue I have more w/ codeblocks which is resizing. Both of them could be an improvement one way or the other |
That would be a sphinx problem, yes. Also, for the original problem, do you mean that code blocks should wrap long lines instead of adding an scroll bar? Personally I don't like wrapping, and I'm not sure if that's required for mobile, maybe an option? this can also be done by adding a custom css rule I guess. The change is sphinx_rtd_theme/src/sass/_theme_rst.sass Line 83 in 5d0a396
to wrap lines that can be changed to |
No I am saying let us say I want a single line like |
@Mentors4EDU I think you mean #321? |
Sphinx uses a very old version of pygments, I am sending a PR to update to a newer version which adds many new languages. |
Closing as a duplicate of #321, if you find this is a separate issue please reopen this report. |
Problem
Code blocks don't resize or aren't dynamic in mobile responsive views
Reproducible Project
Pytorch's Sphinx theme is able to have responsive codeblocks, but unsure how to integrate this to the regular rtd theme
Other
Sphinx has some language interpretation, but XML, YAML, Java, Puppet, etc. don't seem to render as well in the codeblock
.. code:: LANG
argumentsThis is a feature request I want to subscribe to, not a bug
The text was updated successfully, but these errors were encountered: