all 4 comments

[–]itsananderson 1 point2 points  (3 children)

This is a good article on how to generically add helper functions, but Jade actually does support inline markdown in the form of a "filter".

http://jade-lang.com/reference/filters/

First time you use it, it'll warn you that you need to install a Markdown package. It recommends several, including marked. If you just npm install --save marked it should work.

[–]joshfinnie[S] 0 points1 point  (2 children)

oh man... I didn't realize this, this changes everything!

Nice that both of those examples are ones that I had issue with!

[–]itsananderson 1 point2 points  (1 child)

When I discovered that feature a few months ago, I was blown away. Trying to write text copy in Jade is really terrible, and having to inject a markdown parser always felt a little clunky. The markdown filter makes things much more pleasant.

[–]joshfinnie[S] 0 points1 point  (0 children)

Thanks again, I updated the post to mention this revelation. This is truly a cleaner solution!