-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Milestone
Description
Problem
Starting with Sphinx 4.0.0 copying a block of code with :linenos: includes the line numbers along with the code when copied.
To Reproduce
Use Sphinx 4.0.0 or later. Create an RST that references an external file, something like:
.. literalinclude:: array_backed_grid.py
:caption: array_backed_grid.py
:linenos:
Expected behavior
The ability to copy code without line numbers. This worked fine with Sphinx 3.5.7 and before.Example:
Starting with 4.0.0 we get:
Sphinx copy button extension includes line numbers as well.
According to @mgeier the theme might need to be updated to support the new Sphinx 4.0.0 setup? See comments here:
sphinx-doc/sphinx#9363
Environment info
- OS: Windows 10
- Python version: 3.9.5
- Sphinx version: 4.0.0 to 4.0.2

