21

When writing a comment that contains a long sequence of characters without a space the unicode sequence U+200C U+200B (ZWNJ ZWSP) is inserted for formatting purposes by stack exchange.

This feature request is that a warning is displayed via javascript or otherwise when this will occur because the result is that when you paste the snippet from the saved comment you may get compile errors or other odd behavior (such a regex that mysteriously doesn't match) without any obvious reason why without looking at the html source. I know it took me a fair amount of head scratching.

see Occasionally, the Unicode character sequence U+200C U+200B (ZWNJ ZWSP) is inserted into comments or code comment on question inserting character

I understand that there is a legitimate reason this is done for formatting purposes - but it would save some confusion if somehow it was conveyed that this is going to happen such as a warning that appears when 80 non-broken consecutive characters are detected.

10
  • 5
    It does that? o_o I was under the impression it'd be done with CSS word-wrap: break-word... Teeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeesssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssstttttttttttttttttttttttttttttttttttttttttt... Wow, it does, that's... stupid... Jul 4, 2014 at 9:10
  • 4
    Another test: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW Whoops, I broke it! Jul 4, 2014 at 9:11
  • 1
    Code isn't supposed to be posted in comments. In my opinion the real problem is that quite a lot of people post new code in comments instead of editing their question/answer. Maybe instead of displaying a warning like you propose there should be one if you have larger code blocks in your comment. Jul 4, 2014 at 10:07
  • You could also put a comment in your comment, dawg. Jul 4, 2014 at 10:47
  • @Niet - how did you do that?
    – bkr
    Jul 4, 2014 at 18:00
  • @Xaver - the code snippets are often attached to someone else's answer and don't merit being in a separate answer, ie a minor correction or difference in behavior. for example see stackoverflow.com/questions/11809631/… - an alternative regex was suggested: (?=^.{1,254}$)(^(((?!-)[a-zA-Z0-9-]{1,63}(?<!-))|((?!-)[a-zA-Z0-9-]{1,63}(?<!-)‌​\.)+[a-zA-Z]{2,63})$) in the comments but anyone copy/pasting it would find that it did not work - I had to add it to my answer for it to work.
    – bkr
    Jul 4, 2014 at 18:10
  • @bkr I just typed 79 Ws in a row. Jul 4, 2014 at 19:28
  • 1
    @Niet - ah. it's just that the Ws are larger characters. got it. I suppose by that logic the following would also break it horribly: ﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽﷽
    – bkr
    Jul 25, 2014 at 20:01
  • How do you go about doing this?! I wanna do this. I'm trying. It's not working. How do I do this?
    – duci9y
    Jul 27, 2014 at 11:54
  • 1
    Wow, why is this happening?
    – duci9y
    Jul 27, 2014 at 11:56

0

You must log in to answer this question.

Browse other questions tagged .