Skip to main content
1 of 3

Origin of the Markdown editing help code example

The Markdown editing help page currently leads with this code example:

printf("%d\n", 42);  /* What was the
 question again? */

(This quote excludes the four highlighted spaces at the start of each line.)

Obviously, this example comes from the winning answer to a contest, by Frédéric Hamidi. But it is not quite the same. The answer says:

printf("%d\n", 42);  /* What was the
                        question again? */

This specific spacing was added in an edit (by the answer’s original author) with this description:

Ah, silly me, this is supposed to teach how whitespace works in code blocks. Better keep demonstrating fixed-width alignment, then.

It also reflects the previous example (given in the contest question):

printf("goodbye world!");  /* his suicide note
                              was in C */

So where did the spacing used on the Markdown help page come from?