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
Mariya Shklyar
1,022 PointsHow to post code?
I was trying to highlight and copy, but it didn't work
3 Answers
Steven Parker
243,318 PointsCopy-and-paste is part of it, but you have to surround it with the code identifiers, as described in the Markdown Cheatsheet pop-up found below the "Add an Answer" section.
Basically you do this:
- skip a blank line (important!)
- add a line with only 3 accents (```) and (optionally) the name of the language (for syntax coloring)
- then your code
- then another line with only the 3 accents (```)
Jeremy Hill
29,567 PointsAfter highlighting your code press ctrl + c (windows) or cmd + c to copy then click where you want to paste the code and then hit ctrl + v (windows) or cmd + v to paste.