-1

My apologies if this is asked somewhere else, or if this isn't the right place to ask it.

One of the elements of Github flavored markdown that I really appreciate is the ability to use a triple backtick (```) to call out entire blocks of code. Unfortunately, SO's version of markdown doesn't support this, and sometimes it's really painful to have to go in and manually add four spaces before a whole bunch of lines of code.

Am I missing something here? Is there another way to do this?

  • You're right, it's a duplicate. Thanks for the pointer - missed it somehow. – Ken Smith Apr 2 '14 at 17:54
  • no worries. "code block" was the search term – mhlester Apr 2 '14 at 17:55
7

There is another way to do this:

Paste the code, highlight it, and hit Ctrl+K or hit the "Code Sample" icon in the toolbar (the one that looks like {}).

  • 1
    That's helpful - I'd missed that. I still think the triple-backtick is a better solution, but at least I don't have to wear out my fingers on the spacebar anymore :-). – Ken Smith Apr 2 '14 at 17:58

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