13

Probably spaces aren't trimmed or trimmed incorrect and comments area isn't limited as well

styles are broken on comments section

Link to the comment

Navigator -> User Agent

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36

15
  • 4
    No repro in FF 77.0.1 (Linux Mint) Commented Jun 9, 2020 at 17:48
  • 5
    ... but reproduced in Chromium 83.0.4103.61 Commented Jun 9, 2020 at 17:51
  • No repro in Safari version 13.1.1 (15609.2.9.1.2)
    – dmand
    Commented Jun 9, 2020 at 17:53
  • 1
  • Markdown content of that comment is: @JohnDoe, I don't understand what you said. probably you need: ⟨backtick⟩<div v-for="item in queue" :key="item.id"><email-queue-item⟨newline⟩⟨26 spaces⟩:item="item"⟨newline⟩⟨26 spaces⟩v-if="type == 'EmailMessage'"></email-queue-item>⟨newline⟩⟨8 spaces⟩<queue-item ⟨newline⟩⟨26 spaces⟩:item="item"⟨newline⟩⟨26 spaces⟩v-else></queue-item></div>⟨backtick⟩. Commented Jun 9, 2020 at 18:08
  • 2
    Could be one of the reasons why comments aren't meant to be used for multiple lines of code... Commented Jun 9, 2020 at 18:42
  • Related: Code in comment overflows. Commented Jun 18, 2020 at 18:18
  • 2
    This is caused by white-space: pre-wrap; on <code>. It looks like this property was added in error.
    – Dharman Mod
    Commented Sep 11, 2020 at 23:56
  • Found another example comment on this answer.
    – D M
    Commented Oct 4, 2021 at 17:52
  • And this question's comment, same pre-wrap. Commented Feb 17, 2022 at 16:28
  • Yet another example
    – maxshuty
    Commented Apr 30, 2022 at 11:40
  • Spaces should be preserved within code blocks, even inline code blocks, as they may be quite relevant to the code. The solution isn't to disable the white-space setting, but to change it to white-space: break-spaces;.
    – Makyen Mod
    Commented Oct 5, 2022 at 21:04
  • Unfortunately, both Chrome and Firefox do undesirable things with the current setting of white-space: pre-wrap;. Chrome determines where to place line breaks by looking only at the portion of the text which is actually overflowing and then choosing to break that or not. In the case where it's the spaces at the end of the line, Chrome sees that it isn't supposed to break spaces, so it allows those to overflow the container. An alternative would be to look backwards and break the line prior to the spaces, such that the spaces are on the next line. (continued)
    – Makyen Mod
    Commented Oct 5, 2022 at 21:10
  • (continued) This would result in the problem only occurring if the number of spaces exceed the length of a line (i.e. still a problem, but not as severe). Firefox appears to, at least to an extent, break the line earlier, but when it doesn't do that, it collapses a portion of the whitespace at the end of a line, so isn't actually respecting white-space: pre-wrap;, as it's not showing all of the whitespace. Both Chrome and Firefox appear to do the correct thing for white-space: break-spaces;.
    – Makyen Mod
    Commented Oct 5, 2022 at 21:10

0

You must log in to answer this question.

Browse other questions tagged .