-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Newlines are Discarded from Code Copied to Clipboard #249
Comments
It doesn't happen locally when I try it but I see it happening on your site. Do you want to maybe list out your plugins or try deactivating them again? Not sure if you have that test site still set up. CleanShot.2023-10-03.at.12.29.46.mp4 |
Interesting. The staging site is sill up. Let me check. |
Found it. This time the culprit is the Flying Scripts plugin. It defers loading/executing Js until a user action happens. I use it to delay Google Ads. I have the following keywords to defer the Javascript. See any problem here?
|
I tried removing each of the keywords one by one but had no effect even after removing all of them. Only when I deactivated the plugin, did the Copy button start working correctly. |
For now, I will keep the Flying Scripts plugin deactivated. I don't see a performance impact even after disabling it. So it should be good. |
I had a similar issue with LiteSpeed cache. I fixed it by excluding front.js from the Deferred / Delayed JS pipeline. |
That's valuable feedback, thank you. I'll look into that |
Hey, thanks a ton for your reply because I would have never resolved this issue without it! I'm still struggling to resolve this issue while the LiteSpeed Cache plugin is enabled. Similarly to you, I added the |
Thanks for the feedback. Can you link to the plugin? Ultimately, these html minification plugins/services shounld't be removing whitespace from within HTML attributes. At least not by default. Is there a setting related to that under the HTML Settings tab there? |
Gonna take a look for that setting now, but in the meantime...here's a link to their Plugin, Github Repo, and Docs! |
It seems disabling the HTML Minify setting in the |
Thanks for sharing the GitHub. i'll see if I can somehow add an exception so their code doesn't process it by default |
Wow, thanks for being outstanding! Fast replies, helpful solutions, and even looking into adding an exception... I really appreciate all the effort you put into creating and maintaining this plugin as well as helping those who use it! 😄 |
I just noticed that whenever I copy code using the Copy button, the code copied to the clipboard discards newlines (CRLF, etc.). You can see this on the following page.
https://www.circuitstate.com/tutorials/how-to-create-a-standalone-raspberry-pi-pico-c-cpp-project-in-windows-and-build-from-command-line-and-vs-code/
Simply copy any code there using the copy button and paste it into a notepad. The notepad contents look like below for me.
My actual code looks like below.
If copied by drag selection, it works as expected and the newlines are preserved when the code is pasted.
The text was updated successfully, but these errors were encountered: