Skip to main content
edited tags
Link
Cody Gray Mod
  • 244.2k
  • 84
  • 721
  • 763
Post Closed as "Duplicate" by Daniel A. White, Athari, Michael Hoffman, Scott, vascowhite
Expansion.
Source Link
Amal Murali
  • 76.6k
  • 3
  • 29
  • 40

triple backtick Triple backticks for code blocks (like githubGitHub flavored markdown)

It would really be useful if SOStack Overflow supported github'sGitHub's style of triple backticks for code blocks.

Current SOStack Overflow requires indenting every line. That means if I have code like this:

this
  is 
  my
code

I have to manually indent every line with 4 spaces. That mean I can't just copy and paste code from my text edtioreditor, I have to reformat it first like this

    this
      is
      my
    code

In my editor that means I end up modifying the file, which is lame. Or I need to copy and paste the code into another file just so I can modify it. Worse, if I'm using JavaScript I might just be copying and pasting directly out of the browser or from jsfiddleJSFiddle, codepenCodePen, etc. which means it's even more annoying and time wasting to have to go first paste thanthat into my editor or to have to hand edit each and every line in SOStack Overflow.

Triple backticks solve this issue. I just put triple backticks before and after the code like this.:

```
this
  is
  my
code
```

And it should show up like this

this
  is
  my
code

No need to manually edit the indentingidentation.

github GitHub supports this extension to markdown and it's super useful.

Could SOStack Overflow please consider adding something similar?

triple backtick for code blocks (like github flavored markdown)

It would really be useful if SO supported github's style of triple backticks for code blocks.

Current SO requires indenting every line. That means if I have code like this

this
  is 
  my
code

I have to manually indent every line with 4 spaces. That mean I can't just copy and paste code from my text edtior, I have to reformat it first like this

    this
      is
      my
    code

In my editor that means I end up modifying the file, lame. Or I need to copy and paste the code into another file just so I can modify it. Worse, if I'm using JavaScript I might just be copying and pasting directly out of the browser or from jsfiddle, codepen, etc. which means it's even more annoying and time wasting to have to go first paste than into my editor or to have to hand edit each and every line in SO.

Triple backticks solve this issue. I just put triple backticks before and after the code like this.

```
this
  is
  my
code
```

And it should show up like this

this
  is
  my
code

No need to manually edit the indenting.

github supports this extension to markdown and it's super useful.

Could SO please consider adding something similar?

Triple backticks for code blocks (like GitHub flavored markdown)

It would really be useful if Stack Overflow supported GitHub's style of triple backticks for code blocks.

Current Stack Overflow requires indenting every line. That means if I have code like this:

this
  is 
  my
code

I have to manually indent every line with 4 spaces. That mean I can't just copy and paste code from my text editor, I have to reformat it first like this

    this
      is
      my
    code

In my editor that means I end up modifying the file, which is lame. Or I need to copy and paste the code into another file just so I can modify it. Worse, if I'm using JavaScript I might just be copying and pasting directly out of the browser or from JSFiddle, CodePen, etc. which means it's even more annoying and time wasting to have to go first paste that into my editor or to have to hand edit each and every line in Stack Overflow.

Triple backticks solve this issue. I just put triple backticks before and after the code like this:

```
this
  is
  my
code
```

And it should show up like this

this
  is
  my
code

No need to manually edit the identation. GitHub supports this extension to markdown and it's super useful.

Could Stack Overflow please consider adding something similar?

Source Link
user128511
user128511

triple backtick for code blocks (like github flavored markdown)

It would really be useful if SO supported github's style of triple backticks for code blocks.

Current SO requires indenting every line. That means if I have code like this

this
  is 
  my
code

I have to manually indent every line with 4 spaces. That mean I can't just copy and paste code from my text edtior, I have to reformat it first like this

    this
      is
      my
    code

In my editor that means I end up modifying the file, lame. Or I need to copy and paste the code into another file just so I can modify it. Worse, if I'm using JavaScript I might just be copying and pasting directly out of the browser or from jsfiddle, codepen, etc. which means it's even more annoying and time wasting to have to go first paste than into my editor or to have to hand edit each and every line in SO.

Triple backticks solve this issue. I just put triple backticks before and after the code like this.

```
this
  is
  my
code
```

And it should show up like this

this
  is
  my
code

No need to manually edit the indenting.

github supports this extension to markdown and it's super useful.

Could SO please consider adding something similar?