3
\$\begingroup\$

I commented on a person's question with the following markup:

...you have a single-bit mask that increments using `i <<= 1`, e.g. `for(i = 1; i < 1 << 16; i <<= 1)`...

but the way it appeared was

...you have a single-bit mask that increments using i <<= 1, e.g.for (i = 1; i < 1 << 16; i <<= 1)`...

It was as if the first ` were ignored. The same text in an answer appears correctly. I tried several tweaks to the comment in the 5 minutes I had to edit it, but I eventually gave up. What could I have done to make it format properly?

\$\endgroup\$
  • \$\begingroup\$ ...you have a single-bit mask that increments using i <<= 1, e.g. for(i = 1; i < 1 << 16; i <<= 1)... \$\endgroup\$ – Hank D May 4 '16 at 3:56
  • \$\begingroup\$ Hmm it works here, but not in the code review forum itself. \$\endgroup\$ – Hank D May 4 '16 at 3:57
  • \$\begingroup\$ Could it have been a typo? Got a link to the comment in question? \$\endgroup\$ – Mathieu Guindon May 4 '16 at 3:57
  • 2
    \$\begingroup\$ I figured it out -- there was a space after the `. \$\endgroup\$ – Hank D May 4 '16 at 4:02
  • \$\begingroup\$ @Mat'sMug, I checked the documentation page -- I didn't see anything about a space following a backtick cancelling the formatting. \$\endgroup\$ – Hank D May 4 '16 at 4:06
  • \$\begingroup\$ You can still iterate, but instead of an index that increments using i++ you have a single - bit mask that increments using ` i <<= 1, e.g. for(i = 1; i < 1 << 16; i <<= 1)However, with a little imagination, you could find ways to copy whole chunks of a chromosome using &` with a mask containing all the bits you want to copy set to 1, then using shift operators to align them the way you want and splice them in using the | operator. \$\endgroup\$ – Hank D May 4 '16 at 4:08
1
\$\begingroup\$

This is a Stack Exchange wide issue. See this post and its duplicates:

Could Markdown and mini-Markdown have the same support for backticks?

In short, the markdown in posts and the markdown in comments (dubbed "mini-markdown") are implemented differently, and users stumble into all kinds of quirky behavior with the latter. The best we can do is upvote the posts about it on MSE.

\$\endgroup\$

You must log in to answer this question.

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