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.

copying code in console snippets ignores line break

See original GitHub issue

when clicking on console snippets:

image

https://docs.ploomber.io/en/docs/use-cases/research.html

The contents are copied to the clipboard, but the line break is ignored, causing the clipboard to contain:

pip install ploomberploomber examples -n cookbook/grid -o grid

when it should be:

pip install ploomber
ploomber examples -n cookbook/grid -o grid

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Sync271commented, May 22, 2022

@edublancas Sorry, I didn’t understand the problem clearly earlier and maybe spoke too early before looking into the problem😅! I’ve made a PR with the fix now.

1reaction
edublancascommented, May 22, 2022

I think there should be similar snippets in the master branch.

But feel free to open a PR to the docs branch. I’ll merge it soon anyway.

Just ensure that the changes apply to all similarly looking snippets:

.. code-block: console

    some-code
Read more comments on GitHub >

github_iconTop Results From Across the Web

Copy to clipboard with break line - javascript - Stack Overflow
First problem in your code is the $(element).text() jquery text() strips your code from html including the <br> tags. So there is no...
Read more >
Pasting code from Stack Overflow to Notepad loses line ...
My workaround is to click "edit" and copy the code out of the text editor there, ... code copied in Internet Explorer pastes...
Read more >
Get started debugging JavaScript - Microsoft Edge Development
When you get to the specific line of code you want to pause, use a line-of-code breakpoint. Look at the last line of...
Read more >
Prism
Dead simple Include prism.css and prism.js, use proper HTML5 code tags ... inherited so you can only define the language once for multiple...
Read more >
HTML Line Break – How to Break a Line with the HTML <br ...
You can insert line breaks in HTML with the <br> tag, which is equivalent to a carriage return on a keyboard. Be aware...
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