(JS) Markdown issue in flask

I have a small problem with markdown in my flash project. I want markdown to work for all posts, currently it only works for the first post. I suspect I need to use some kind of loop, but I don’t know …