Mixed mode that doesn't break on images
This commit is contained in:
parent
bb1425c6f7
commit
598e4f272d
2 changed files with 10 additions and 2 deletions
|
@ -43,8 +43,10 @@ module Engines
|
|||
|
||||
class Mixed < AbstractEngine
|
||||
def mask
|
||||
RedCloth.new(@content, @content.options[:engine_opts]).to_html(
|
||||
:textile, :markdown)
|
||||
redcloth = RedCloth.new(@content, @content.options[:engine_opts])
|
||||
redcloth.filter_html = false
|
||||
redcloth.no_span_caps = false
|
||||
redcloth.to_html
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -302,6 +302,12 @@ class RevisionTest < Test::Unit::TestCase
|
|||
list_with_tildas)
|
||||
end
|
||||
|
||||
def test_textile_image_in_mixed_wiki
|
||||
@web.markup = :mixed
|
||||
assert_markup_parsed_as(
|
||||
"<p><img src=\"http://google.com\" alt=\"\" />\nss</p>",
|
||||
"!http://google.com!\r\nss")
|
||||
end
|
||||
|
||||
|
||||
def assert_markup_parsed_as(expected_output, input)
|
||||
|
|
Loading…
Reference in a new issue