Is there a way to properly indent and format code in comments made on Github pull requests ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Fenced code blocks
Markdown converts text with four spaces at the front of each line to code blocks. GFM supports that, but we also support fenced blocks. Just wrap your code blocks in “` and you won’t need to indent manually to trigger a code block.
Syntax highlighting
We take code blocks a step further and add syntax highlighting if you request it. In your fenced block, add an optional language identifier and we’ll run it through syntax highlighting. For example, to syntax highlight Ruby code: