-
-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying code blocks from markdown removes new lines on Firefox #1883
Comments
If you want to copy the whole block, you can use the copy button in the corner. That preserves the newlines. But you're right, that this should be fixed somehow. |
Line breaks are only removed (in Firefox), when a code block is highlighted |
7 tasks
Is the copy button a Docus thing? I don't have it in my own app. EDIT: looks like it's a |
Released in v2.5.0 thanks to @nobkd 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Irrelevant
Reproduction
https://content.nuxtjs.org/get-started
Describe the bug
When writing code blocks in markdown, the generated HTML uses
<span class="line">
elements to represent a line.This would be perfectly fine if Firefox was taking
display: block
into account and was rendering new lines when copying, like Chrome or Safari, but it does not.For instance, copying a multi-line code block from the docs from Firefox would copy that:
The expected result would be, of course, the original snippet:
If there's a CSS work-around for adding new lines, this would be a potential fix. Otherwise, I suggest replacing the generated
span
withdiv
, which behaves as expected.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: