How can I render markdown in express.js jade template?

Viewed 13445

I use the express js framework. I have a markdownified string from the database and want to render it as HTML in my jade template. I installed node-markdown and want to render it this way:

app.js

var md = require("node-markdown").Markdown;

template.jade

- each note in todo.notes
  div= md(note.string)

However, it doesn't print out anything... any advice at this?

Thanks!

EDIT: solved it myself, just forgot to get the md variable into my view...

5 Answers
Related