Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Markdown parser package
  • Hi, I was wondering if you could use the parser package to transform regular text instead of parsing a file. So instead of doing:
    View::forge('blog/article.md');
    

    I would be able to do something like:
    Markdown::parse($article->body);
    

    Is this possible with the 1.1 release? Is it coming in the future? Thanks in advance, Gilles
  • Check the Markdown class, it does exactly what you want.
  • Harro Verton wrote on Sunday 25th of March 2012:
    Check the Markdown class, it does exactly what you want.
    I found out why it wasn't working for me earlier. (I did exactly that this morning) I had to disable automatic output filtering, white listing the Markdown class didn't work. Is this intentional?
  • Can't comment on that because I don't know what you are doing? Passing a markdown object to a view? Passing the parsed result? If you pass HTML to a view (whether from the Markdown parser or from from elsewhere), you need to disable escaping.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion