Google Chrome pushed an update earlier this month, 60.0.3112.101, which makes it impossible to format code containing long lines. Maybe it even started in an earlier version, I just now noticed it:
<textarea cols="20" rows="10">01234567890123456789</textarea>
When running the snippet, try to put four spaces at the start of the "0123..." line. After two spaces, the browser will automatically insert a line break. This of course breaks the intended formatting.
Not really sure this is on-topic for Meta, but wanted to post it to warn others.
I noticed it while editing this post on Windows 10. I wanted to turn:
services.AddDbContext<DataContext>(options => options.UseSqlServer(Configuration["ConnectionStrings:LocalConnectionString"]));
Into:
services.AddDbContext<DataContext>(options =>
options.UseSqlServer(Configuration["ConnectionStrings:LocalConnectionString"]));
For readability, but can now no longer do that from the browser. Try editing this Meta post and prepending spaces to the line starting with options
above.
Note: copy-pasting four spaces does bypass this ridiculous behavior, so it's not even implemented consistently. I can't find the change yet in Chrome's release notes.