How to display line numbers using GitHub Flavored Markdown “code”?
I know I can use "code" in GitHub Flavored Markdown to highlight a code snippet. But I am not able to display line numbers for a snippet. Is there a way to do so? ```javascript var s = "JavaScript syntax highlighting"; alert(s); ``` I want a line number to be put at the beginning of each line, like this: 1 var s = "JavaScript syntax highlighting"; 2 alert(s); As you may noticed in Markdown Cheatsheet , GitHub does not show line numbers in code blocks. As a hack, you could save a pic of your code at https://carbon.now.sh and post it; they support line numbers as an option. You can get something