-
Notifications
You must be signed in to change notification settings - Fork 17
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
code-block rendering does not work as expected #174
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
This feature does work, but it differs between MyST-JS and Sphinx. We should ensure that they behave the same, although Sphinx has quirks. @rowanc1 the following code blocks look different in Sphinx and MyST-JS: ```{code-block}
:lineno-start: 10
:linenos:
:emphasize-lines: 12,13
1, 2, 3
4
5
6
7
```
```{code-block}
:lineno-start: 10
:emphasize-lines: 12,13
1, 2, 3
4
5
6
7
```
```{code-block}
:lineno-start: 10
:emphasize-lines: 2,3
1, 2, 3
4
5
6
7
``` It looks like Sphinx doesn't use I'm running out of cycles to do this right now, but it looks simple enough: |
Ha, I remember explicitly testing that the offset worked properly and the lines we were highlighting were the same!! Happy to take that out and revert to how sphinx works here. Adding a warning about highlighting lines outside the visible region could also be good! |
Right - I personally think our implementation is the right one, but I know that we won't change sphinx on this 😅 |
I have fixed the first portion of the bug |
code-block rendering should support line numbers and highlighting.
JupyterLab Preview:
Output of similar code block with latexpdf in Sphinx:
For VsCodium preview see related issue ticket:
executablebooks/myst-vs-code#57
(My preffered IDE would be PyCharm but it does not seem to support MyST directives.)
The text was updated successfully, but these errors were encountered: