1

Is there any global option for rdiscount to enable parsing markdown in block html tags? And any way to use that option within Octopress/Jekyll? This is the option that Kramdown supports:

parse_block_html Process kramdown syntax in block HTML tags If this option is true, the kramdown parser processes the content of block HTML tags as text containing block-level elements. Since this is not wanted normally, the default is false. It is normally better to selectively enable kramdown processing via the markdown attribute.

Default: false

Unfortunately, Jekyll does not pass this kramdown flag to kramdown. I opened an issue on that: https://github.com/mojombo/jekyll/issues/1095

justingordon
  • 12,553
  • 12
  • 72
  • 116

1 Answers1

3

No. There is no RDiscount option for this. All options are listed in the API docs here: http://rdoc.info/github/davidfstr/rdiscount/RDiscount

Here is a workaround for Jekyll/Octopress. Consider the following example:

<div>
    I want this to be in *Markdown*!
</div>

You can use the markdownify tag in Jekyll to manually force a section to be in Markdown:

<div>
    {% capture m %}I want this to be in *Markdown*!{% endcapture %}
    {{ m | markdownify }}
</div>
David Foster
  • 6,931
  • 4
  • 41
  • 42
  • That almost works. The problem is that the resulting between {{ }} and is placed in a paragraph block. Any way around that? – justingordon May 14 '13 at 07:50
  • Try putting the ...{% endcapture %}{{ m | markdownify }} together, directly adjacent to each other. RDiscount may be getting confused by the blank line where the {% capture %} appears. Let me know if this works - I'll update the Answer if it does. – David Foster May 16 '13 at 01:48