I wrote a solution to a code golf challenge that included the string ".... ....". This exact number of dots and spaces was necessary for the solution to work.

Two users commented (here, here) on ways to golf it down. I tested their suggestions and found that they didn't work. Initially I thought the users were confused; Then I tried to write a comment:

@User That doesn't work; Did you mean for the string to be ".... ...."?

And it rendered as:

@User That doesn't work; Did you mean for the string to be ".... ...."?

Is this intentional? If so, why? It has surely caused problems like this before. However, it looks like a bug to me. In posts, multiple spaces in backtick code blocks render as expected.

  • 1
    \$\begingroup\$ I can reproduce this behavior in the formatting sandbox: meta.stackexchange.com/questions/3122/formatting-sandbox/… \$\endgroup\$
    – DJMcMayhem
    May 15, 2017 at 19:20
  • 1
    \$\begingroup\$ I can also find unexpected behaviour with the character counter: puu.sh/vR0qt/db6bb5a889.png \$\endgroup\$
    – Okx
    May 15, 2017 at 19:23
  • 2
    \$\begingroup\$ This was fixed almost 8 years ago, but it seems to be back now. Since this seems to be a network wide problem, I have brought up the issue again here. \$\endgroup\$
    – DJMcMayhem
    May 15, 2017 at 19:34
  • 1
    \$\begingroup\$ I use non-breaking spaces to get around this issue when I must. \$\endgroup\$ May 15, 2017 at 19:40
  • \$\begingroup\$ @ETHproductions Does that work in code blocks? \$\endgroup\$
    – MD XF
    May 15, 2017 at 19:41
  • \$\begingroup\$ You can't use  , you just have to copy-paste a raw non-breaking space from somewhere. I primarily use Windows, so I copy it from the Character Map program (it's the character after ~). Example: non-breaking    spaces   \$\endgroup\$ May 15, 2017 at 19:42
  • \$\begingroup\$ @ETHproductions Wow,▓just▓found▓my▓new▓favorite▓pastime.░That's░awesome. \$\endgroup\$
    – MD XF
    May 15, 2017 at 19:43
  • \$\begingroup\$ ....      .... alternating space and NBSP \$\endgroup\$ May 15, 2017 at 21:01
  • 1
    \$\begingroup\$ I'm reading this on the mobile app and the spaces in the code blocks in the question are being "collapsed" too. \$\endgroup\$
    – Shaggy
    May 16, 2017 at 20:30
  • \$\begingroup\$ This appears to be status completed now \$\endgroup\$ Jun 2, 2021 at 17:17

1 Answer 1


As a workaround, you can make each character a different type of space; e.g. alternate normal and non-breaking spaces:


@edit: As @ETHproductions points out, simply use all non-breaking space.

The wikipedia article lists several entry methods in various environments.

  • \$\begingroup\$ ....      .... alternating space and NBSP \$\endgroup\$ May 15, 2017 at 21:05
  • \$\begingroup\$ Or just use all NBSP's \$\endgroup\$ May 15, 2017 at 21:05
  • \$\begingroup\$ ....      .... All NBSP \$\endgroup\$ May 15, 2017 at 21:06
  • \$\begingroup\$ @ETHproductions fair enough. It didn't seem to work for me before when I tried, but now it looks good. \$\endgroup\$ May 15, 2017 at 21:06
  • 1
    \$\begingroup\$ Do we really need to use a workaround - couldn't we just get a bugfix? \$\endgroup\$
    – MD XF
    May 15, 2017 at 21:10
  • \$\begingroup\$ @MDXF it's now been reported here: meta.stackexchange.com/q/296038/310400 \$\endgroup\$ May 16, 2017 at 7:04
  • \$\begingroup\$ @numbermaniac Yeah, because DJMcMayhem posted that after reading this. \$\endgroup\$
    – MD XF
    May 16, 2017 at 16:22
  • \$\begingroup\$ @MDXF, it's not really a bug: it's a design flaw in HTML. As such any "bug fix" implemented by the website is really a workaround rather than a bug fix. \$\endgroup\$ Jul 15, 2017 at 6:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .