Closed davecom closed 8 years ago
Hello @davecom. GRMustache will not have built-in support for markdown.
The simplest solution is to prepare your input, feed your templates with HTML generated by markdown, and use triple-mustache tags {{{ dog }}}
to avoid escaping of this HTML.
A more involved solution could use, as you say, filters ({{ markdown(dog) }}
) that return rendering objects (in order to explicitly manage the HTML content type) but I must first advise the simplest solution above.
Thanks for the reply and thanks for making a great library.
This is more a "want to have" - but it would be incredible if with HTML templates there was the ability to auto-parse Markdown. For example if I have
<p> {{ dog }} </p>
in my template anddog
contains a String which is in Markdown then the output in the template would be translated into HTML. Right now I'm planning to string together GRMustache with MMMarkdown via a Formatter or Rendering Object. Is that the best way to solve this issue?