Skip to main content
replaced http://askubuntu.com/ with https://askubuntu.com/
Source Link

Code segments can be formatted by either starting the line with four spaces or by enclosing the code in backticks.

What is the reason for using one over the other?

The reason I ask is that my answer to No Date and Time on 14.10No Date and Time on 14.10 has been edited by KasiyA to change my backticks into four spaces, and I got feedback from Fabby about using four spaces for code blocks.

But as far as I can tell, it looks exactly the same as it did before.

What is the difference between the two, and when should they be used? I note that backticks are not mentioned on http://askubuntu.com/editing-helphttps://askubuntu.com/editing-help.

A secondary but related question is why the same level of formatting is not supported in comments? I spent some considerable time trying to format my comment on What exactly is an "Ubuntu App", as made with the Ubuntu SDK?What exactly is an "Ubuntu App", as made with the Ubuntu SDK? into a numbered list, and couldn't do it. And then I read the Help page...

Code segments can be formatted by either starting the line with four spaces or by enclosing the code in backticks.

What is the reason for using one over the other?

The reason I ask is that my answer to No Date and Time on 14.10 has been edited by KasiyA to change my backticks into four spaces, and I got feedback from Fabby about using four spaces for code blocks.

But as far as I can tell, it looks exactly the same as it did before.

What is the difference between the two, and when should they be used? I note that backticks are not mentioned on http://askubuntu.com/editing-help.

A secondary but related question is why the same level of formatting is not supported in comments? I spent some considerable time trying to format my comment on What exactly is an "Ubuntu App", as made with the Ubuntu SDK? into a numbered list, and couldn't do it. And then I read the Help page...

Code segments can be formatted by either starting the line with four spaces or by enclosing the code in backticks.

What is the reason for using one over the other?

The reason I ask is that my answer to No Date and Time on 14.10 has been edited by KasiyA to change my backticks into four spaces, and I got feedback from Fabby about using four spaces for code blocks.

But as far as I can tell, it looks exactly the same as it did before.

What is the difference between the two, and when should they be used? I note that backticks are not mentioned on https://askubuntu.com/editing-help.

A secondary but related question is why the same level of formatting is not supported in comments? I spent some considerable time trying to format my comment on What exactly is an "Ubuntu App", as made with the Ubuntu SDK? into a numbered list, and couldn't do it. And then I read the Help page...

Tweeted twitter.com/#!/AskUbuntu/status/572001456494120960
Source Link
Carl H
  • 6.3k
  • 11
  • 12

Code formatting: backticks or four spaces?

Code segments can be formatted by either starting the line with four spaces or by enclosing the code in backticks.

What is the reason for using one over the other?

The reason I ask is that my answer to No Date and Time on 14.10 has been edited by KasiyA to change my backticks into four spaces, and I got feedback from Fabby about using four spaces for code blocks.

But as far as I can tell, it looks exactly the same as it did before.

What is the difference between the two, and when should they be used? I note that backticks are not mentioned on http://askubuntu.com/editing-help.

A secondary but related question is why the same level of formatting is not supported in comments? I spent some considerable time trying to format my comment on What exactly is an "Ubuntu App", as made with the Ubuntu SDK? into a numbered list, and couldn't do it. And then I read the Help page...