Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Following YAML snippet that I'm trying to place in my markdown formatted readme:

- name: numpy     
version: "1.6.1"   

Tried the above with both no and 2 trailing spaces at the end of each line. Both turn out on a single line. Obviously I want them on 3 separate lines in my README.md.


edit: note tried adding 'yaml' as the optional lang parameter but no dice either.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

IIRC, github uses


syntax. You can omit lang, but if you include it, the syntax highlighting is used for that lang.

share|improve this answer
that's what I tried (see edit) - I forgot stackexchange uses markdown too... –  rutherford Oct 28 '12 at 16:28
I just tried it, it works fine for me (in preview, did not actually save). Shows on three lines, plain black with only three backticks, syntax-highlighted with ```yaml. No trailing spaces. –  herby Oct 28 '12 at 16:34
only thing I can think of fecking things up is the fact mine is inside a numbered list? - it's @ github.com/rutherford/nltk-gae if it's any use. –  rutherford Oct 28 '12 at 17:07
Add an empty line after closing ``` and it will work. –  herby Oct 28 '12 at 17:13
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.