Detect <img> images in markdown rich text
This commit is contained in:
parent
3cc0458468
commit
25aea657e2
2 changed files with 7 additions and 1 deletions
|
@ -275,6 +275,11 @@ class RichTextTest < ActiveSupport::TestCase
|
|||
assert_equal "https://example.com/image1.jpg", r.image
|
||||
end
|
||||
|
||||
def test_markdown_html_image
|
||||
r = RichText.new("markdown", "<img src='https://example.com/img_element.png'>")
|
||||
assert_equal "https://example.com/img_element.png", r.image
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def assert_html(richtext, &block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue