diff --git a/app/models/chunks/engines.rb b/app/models/chunks/engines.rb index 8e9e08ce..6378f843 100644 --- a/app/models/chunks/engines.rb +++ b/app/models/chunks/engines.rb @@ -33,7 +33,7 @@ module Engines class Markdown < AbstractEngine def mask - RedCloth.new(@content, @content.options[:engine_opts]).to_html(:markdown) + RedCloth.new(@content, @content.options[:engine_opts]).to_html(:block_textile_lists, :inline_textile_span, :markdown) end end diff --git a/test/unit/revision_test.rb b/test/unit/revision_test.rb index c939ad65..f8cd3cad 100755 --- a/test/unit/revision_test.rb +++ b/test/unit/revision_test.rb @@ -71,6 +71,26 @@ class RevisionTest < Test::Unit::TestCase %{

This is a code block:

\n\n\n\t
def a_method(arg)\n} +
 	    %{return ThatWay
\n\n\n\t

Nice!

}, code_block) + + textile_and_markdown = [ + 'Markdown heading', + '================', + '', + 'h2. Textile heading', + '', + '*some* **text** _with_ -styles-', + '', + '* list 1', + '* list 2' + ].join("\n") + + assert_markup_parsed_as( + "

Markdown heading

\n\n\n\t" + + "

h2. Textile heading

\n\n\n\t" + + "

some text with styles

\n\n\n\t" + + "", + textile_and_markdown) + end def test_rdoc