Possible Duplicate:
How do comments work?
How do I add code while writing comments and how do I enter a newline character?
2 Answers 2
You can't put newlines in a comment codeblock, but you can do inline code by using the backtick character. It looks like this
`
and it appears below the escape key on most keyboards which is sometimes the same key as the tilde (for example, on US English keyboards):
~
Surrounding something in backticks lets it appear as an "inline code block" and you could put them almost anywhere you like, even breaking across new lines. int c; c++; sprintf(); but notice there's no coloration, of course.
E.g. typing `something` in the editor produces something on the page
-
Better to upvote or accept, but I'll take the thanks for now ;)jcolebrand– jcolebrand2011年01月12日 18:47:00 +00:00Commented Jan 12, 2011 at 18:47
-
-
'something' this is a testTyler– Tyler2014年11月30日 12:07:05 +00:00Commented Nov 30, 2014 at 12:07
-
~something~ this is another testTyler– Tyler2014年11月30日 12:08:08 +00:00Commented Nov 30, 2014 at 12:08
-
-
-
you need to place the symbol just before the letter, and no spacing between the back quote and
startingletter. ` FYI` :Pravi.zombie– ravi.zombie2015年12月15日 02:10:49 +00:00Commented Dec 15, 2015 at 2:10 -
test
codein commentsNovice_Developer– Novice_Developer2016年06月26日 07:44:12 +00:00Commented Jun 26, 2016 at 7:44 -
1Thanks. I thought they meant the single quote '. Luckily I found this answer in under 4 minutes or I could have earned the "Can't tell a backtick from a single quote" badge.Elise van Looij– Elise van Looij2016年07月09日 15:58:11 +00:00Commented Jul 9, 2016 at 15:58
-
this is
testcommandWissam Roujoulah– Wissam Roujoulah2016年11月21日 12:00:11 +00:00Commented Nov 21, 2016 at 12:00 -
This is a
testYannis Dran– Yannis Dran2016年11月27日 13:46:44 +00:00Commented Nov 27, 2016 at 13:46 -
2And now you're flooded with a bunch of
test codescomments.Gellie Ann– Gellie Ann2016年12月21日 01:36:51 +00:00Commented Dec 21, 2016 at 1:36 -
1This is a test because this was not working for me
ok? <br> This is not giving me a line break. I cannot line break. /sighAutomationtested– Automationtested2017年06月06日 05:47:42 +00:00Commented Jun 6, 2017 at 5:47 -
Not in comments you can'tjcolebrand– jcolebrand2017年06月06日 07:11:49 +00:00Commented Jun 6, 2017 at 7:11
-
1Just an update,
does it still work?Yes, it does.Stack Underflow– Stack Underflow2018年06月13日 23:24:07 +00:00Commented Jun 13, 2018 at 23:24
Place this symbol: ` before and after the code. (On many keyboards, this "backtick" is the button to the left of "1".)
-
@CHID: like drachenstern said, better to upvote or accept. ;)John– John2011年01月12日 18:48:10 +00:00Commented Jan 12, 2011 at 18:48
-
¨ds¨ test vfdsfdsDejo Dekic– Dejo Dekic2016年01月28日 22:00:49 +00:00Commented Jan 28, 2016 at 22:00
This is code.