question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] [Docs] Do not copy line numbers when clicking the clipboard

See original GitHub issue

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

Docs such as this one include code snippets that can be copied by clicking a clipboard pop-up:

clipboard

However, due to updates in the doc formatting, clicking this clipboard now also copies line numbers (that are inserted using :linenos: in the source rst documentation files). The requested feature is to allow users to click this clipboard and copy only the code, not the line numbers.

Use case

This feature makes it easier to follow along coding examples in the documentation.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maxpumperlacommented, Jan 29, 2022

ok, so surprisingly enough this seems to be a sphinx >= 4.0 issue, which needs to be patched in downstream themes:

https://github.com/sphinx-doc/sphinx/issues/9363

The RTD theme has fixed it, the book theme might not be aware yet:

https://github.com/readthedocs/sphinx_rtd_theme/issues/1168

0reactions
stale[bot]commented, Dec 11, 2022

Hi again! The issue will be closed because there has been no more activity in the 14 days since the last message.

Please feel free to reopen or open a new issue if you’d still like it to be addressed.

Again, you can always ask for help on our discussion forum or Ray’s public slack channel.

Thanks again for opening the issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Copy to clipboard feature also adding line numbers · Issue #884
This is an issue with the Vitepress alpha version. We have some code blocks with line numbers enabled in markdown. It would appear...
Read more >
Copy and paste using the Office Clipboard - Microsoft Support
To open the Clipboard task pane, click Home, and then click the Clipboard dialog box launcher. Double-click the image or text you want...
Read more >
How can I avoid copying line numbers to my clipboard from vim?
A better option is to become aware of the registers + (clipboard) and * (primary selection) and make use of them. (See :help...
Read more >
Copy and paste text and images - Google Docs Editors Help
You can copy and paste text and images between your files — even if you're going from one type of file to another....
Read more >
'containing' line numbers from Find window not copied anymore
All the lines, WITHOUT any line number ·, select the new Copy option ; All the lines, WITH the line numbers ·, hit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found