[RESTORES BUILD] RedCloth does not support hard breaks in mixed mode

This commit is contained in:
Alexey Verkhovsky 2005-04-10 17:57:24 +00:00
parent a251b658f1
commit 5c97cc593e
2 changed files with 5 additions and 3 deletions

View file

@ -43,7 +43,7 @@ module Engines
class Mixed < AbstractEngine class Mixed < AbstractEngine
def mask def mask
RedCloth.new(@content, [:hard_breaks] + @content.options[:engine_opts]).to_html( RedCloth.new(@content, @content.options[:engine_opts]).to_html(
:textile, :markdown) :textile, :markdown)
end end
end end
@ -54,6 +54,6 @@ module Engines
end end
end end
MAP = { :textile => Textile, :markdown => Markdown, :mixed => Mixed, :rdoc => RDoc, } MAP = { :textile => Textile, :markdown => Markdown, :mixed => Mixed, :rdoc => RDoc }
MAP.default = Textile MAP.default = Textile
end end

View file

@ -104,7 +104,9 @@ class RevisionTest < Test::Unit::TestCase
@web.markup = :mixed @web.markup = :mixed
assert_markup_parsed_as( assert_markup_parsed_as(
"<h1>Markdown heading</h1>\n\n\n\t<h2>Textile heading</h2>", "<h1>Markdown heading</h1>\n\n\n\t<h2>Textile heading</h2>\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) textile_and_markdown)
end end