Added some Textile rules to markdown option, in an attempt to force RedCloth to _really_ render Markdown
This commit is contained in:
parent
363276e436
commit
ee876a2907
2 changed files with 21 additions and 1 deletions
|
@ -33,7 +33,7 @@ module Engines
|
||||||
|
|
||||||
class Markdown < AbstractEngine
|
class Markdown < AbstractEngine
|
||||||
def mask
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,26 @@ class RevisionTest < Test::Unit::TestCase
|
||||||
%{<p>This is a code block:</p>\n\n\n\t<pre><code>def a_method(arg)\n} +
|
%{<p>This is a code block:</p>\n\n\n\t<pre><code>def a_method(arg)\n} +
|
||||||
%{return ThatWay</code></pre>\n\n\n\t<p>Nice!</p>},
|
%{return ThatWay</code></pre>\n\n\n\t<p>Nice!</p>},
|
||||||
code_block)
|
code_block)
|
||||||
|
|
||||||
|
textile_and_markdown = [
|
||||||
|
'Markdown heading',
|
||||||
|
'================',
|
||||||
|
'',
|
||||||
|
'h2. Textile heading',
|
||||||
|
'',
|
||||||
|
'*some* **text** _with_ -styles-',
|
||||||
|
'',
|
||||||
|
'* list 1',
|
||||||
|
'* list 2'
|
||||||
|
].join("\n")
|
||||||
|
|
||||||
|
assert_markup_parsed_as(
|
||||||
|
"<h1>Markdown heading</h1>\n\n\n\t" +
|
||||||
|
"<p>h2. Textile heading</p>\n\n\n\t" +
|
||||||
|
"<p><strong>some</strong> <b>text</b> <em>with</em> <del>styles</del></p>\n\n\n\t" +
|
||||||
|
"<ul>\n\t<li>list 1</li>\n\t\t<li>list 2</li>\n\t</ul>",
|
||||||
|
textile_and_markdown)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_rdoc
|
def test_rdoc
|
||||||
|
|
Loading…
Reference in a new issue