You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest to add the emphasize-lines directive to code blocks, Sphinx-like. Emphasizing lines is an already supported feature in Pygments, so the implementation is trivial. I've already patched my local Nikola installation and it has been working fine. I can submit a PR with the proper tests if you are ok with this addition.
This is an example taken from the Sphinx docs of how it works:
.. code-block:: python
:emphasize-lines: 3,5
def some_function():
interesting = False
print('This line is highlighted.')
print('This one is not...')
print('...but this one is.')
Line ranges are also supported, such as:
:emphasize-lines: 1-3,5-9,15
The text was updated successfully, but these errors were encountered:
I suggest to add the
emphasize-lines
directive to code blocks, Sphinx-like. Emphasizing lines is an already supported feature in Pygments, so the implementation is trivial. I've already patched my local Nikola installation and it has been working fine. I can submit a PR with the proper tests if you are ok with this addition.This is an example taken from the Sphinx docs of how it works:
Line ranges are also supported, such as:
The text was updated successfully, but these errors were encountered: