views:

21

answers:

2

I need to call some helpers from a Markdown view. Is this somehow a good practice and is generally supported on popular ruby-based Markdown parsers?

A: 

No, it isn't. Markdown is a standardized, text-focused, cross-language format and the most of Markdown parsers offers support for the standard syntax.

However, platforms that need advanced features, such as wiki and GitHub, adds custom features. Common features, are tags to generate page TOC based on the document structure.

AFAIK, not BlueCloth nor RDiscount offers built-in support for extensions. You would have to code them yourself before passing the markdown text to processor.

Simone Carletti
A: 

Extending the class to handle new tags or syntax is not a bad idea, but eval'ing inline ruby code from a possibly untrusted source is an absolutely horrible idea!

DGM
well it's for my blog, I'll be the only one writing :) Any reference on how to extend markdown syntax for Bluecloth or any other ruby gem?
knoopx