mystmd
mystmd copied to clipboard
When copying code manually from `{code}` directive with `linenos` enabled, blank lines are copied between each code line
trafficstars
When I have a code block like so:
```{code} python
:linenos:
print("Hello, world!")
print("Good night, moon!")
print("I'm a monster! Don't look at me!")
```
If I only want to copy the first two lines by selecting them and CTRL+C or right-click copy (i.e. not using the copy button at the top right of the code block), a blank line is inserted between each line I copied.
print("Hello, world!")
print("Good night, moon!")
With :linenos: turned off, the copy works as expected.
print("Hello, world!")
print("Good night, moon!")