-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?

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

1 Answer 1

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
  • 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 :-). Commented Apr 2, 2014 at 17:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.