Removes extra spaces from HTML that cause blocks of code to look incorrect

Hi all!

It seems that I found a bug in the Cloudflare caching system.

I have a website https://laravel-lang.com. The other day I changed the documentation generator to Jetbrains Writerside and from that moment problems appeared.

The problem is that all the code blocks have become squashed. They do not display indents even though the HTML on the server physically contains them.

I checked both when deploying to GitHub Pages and to my server.

Why exactly a bug? It’s simple - if there is a “-” character in the domain name, then the code is incorrectly changed by the Cloudflare caching system.

I checked on the following domain names:

  1. laravel-lang.com - fail
  2. foo.laravel-lang.com - fail
  3. lang.dragon-code.pro - fail
  4. refactor.style - ok
  5. foo.refactor.style - ok
  6. foo-bar.refactor.style - ok
  7. cashbox.city - ok
  8. andrey-helldar.github.io/test/ - ok
  9. laravel-lang.github.io/docs/ - ok

But as soon as I enable “Developer Mode” in the Cloudflare interface, the problem immediately disappears.

The “Cache Level” parameter is set to “Standard”.

How can I fix this problem?


Do you have Auto Minify enabled in the Speed tab?

2 Likes

Everything indicates that it is activated…

I turned off minification for HTML and everything worked. I tried to solve this problem for the second day. Thank you very much!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.