Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
travis spade
9,816 PointsWhy don't 3 backticks after a code example generate a code block?
I tried answering a question on the forum, but the code doesn't get formatted with mark down. I added three backticks before and after the code, but it just showed up a plain text.
For example, I wrote something like:
var myNum = 5;
It didn't get converted. I also tried starting it with
and
but those didn't work eiter.
travis spade
9,816 PointsAlso it looks like the three backticks in my question above are missing since they are getting converted. I'm not why it's sort of working in my question but not in my answer on another thread.
2 Answers
Steve Hunter
57,712 PointsI just added three backticks to the post in the link you posted - that now looks OK to me. Click on the 'edit' option to see what I added to your post. Or this one.
var num = 8;
var name = "steve"
I hope that helps!
Steve.
travis spade
9,816 PointsIt looks like I needed to an additional carriage return after the colon but before the three backticks. Thanks!
Steve Hunter
57,712 PointsYes, I think it needs a new line prior to the backticks for it to work properly.
Chyno Deluxe
16,936 PointsI've edited your post to the proper way to display code in a post. To answer your question. the code blocks must be separated by at least a single line in order to be converted.
How to post code

travis spade
9,816 Pointstravis spade
9,816 PointsYou can see my answer that is not formatted properly at https://teamtreehouse.com/community/how-can-i-pass-a-variable-outside-of-a-function