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
nbconvert: use r pygmentize backend when highlighting "%%R" cells #4184
Comments
That's true for many things like |
Sure, I will give it a try, but I know very little about IPython architecture. Thanks, Pablo |
Sure, wherever the PR come from, it will be reviewed, we don't treat regular of new user differently. Just ask if we are not clear on how to do things, it is often hard to judge how people are used to code. You will probably need an heuristic in nbconvert preprocessor that inspect the cell source and decide for a highlighting scheme, stuff this in metadata along with the cell, and use those metadata to feed them to the hightlight filter in templates. @jdfreder should also be able to help you too. |
Detect cells that use language extension magics such as %%R or %%bash and call the appropriate pygmentize lexer. Closes ipython#4184
The extension Fortran magic monkeypatch the javascript Shoudn't (this)[https://github.com/pablooliveira/ipython/blob/009a294cba472233585a4c1dbbbba6e3cfc2cb59/IPython/nbconvert/filters/highlight.py#L34] dictionary populate dinamically ? |
You can use the HighlightMagicsPreprocessor.languages configuration to add fortran to this dictionary when using Fortran magic plugin. |
Detect cells that use language extension magics such as %%R or %%bash and call the appropriate pygmentize lexer. Closes ipython#4184
It would be very nice to have R syntax highlighting on cells using the '%%R' magic when using nbconvert.
Tested on:
The text was updated successfully, but these errors were encountered: