-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Indentation issue when using copy button #345
Comments
Thanks for reporting. Do they have any setting to allow html attributes? Seems like a bug in their code to be stripping out valid whitespace like this. You could also not minify html at all for now. I'll try to dig in and see if there's something I can do to exclude it, or another workaround. |
Thank you for the quick response. Here on this page about HTML minification on the official W3 Total Cache website, there is a setting about ignoring comments. But if I understand correctly, it only applies to not removing comments from the source code, not preserving spaces from an element between two comments, for example. |
If you disable the html minify it works? What if you select/deselect the "Line break removal" option? Any difference? |
Sorry for the late reply. I disabled HTML minification and the copy button works perfectly - the indentation is not lost in this case. The 'Line break removal' was already disabled. |
Hello!
When I insert a block of code into a post, the indentation is displayed normally. However, when I use the copy button, the indentation is lost.
Apparently this is caused by the cache plugin that I use to minify all the code on the page, W3 Total Cache.
Because the copied code is the same as the one that appears in the page's source code.
Is there any way to solve this issue without having to disable the W3 Total Cache minify feature?
The text was updated successfully, but these errors were encountered: