end
IMAGE_RE = /
- (<p>|\s|^) # start of line?
+ (>|\s|^) # start of line?
\! # opening
(\<|\=|\>)? # optional alignment atts
(#{C}) # optional style,class atts
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
end
+ def test_inline_images_inside_tags
+ raw = <<-RAW
+h1. !foo.png! Heading
+
+Centered image:
+
+p=. !bar.gif!
+RAW
+
+ assert textilizable(raw).include?('<img src="foo.png" alt="" />')
+ assert textilizable(raw).include?('<img src="bar.gif" alt="" />')
+ end
+
def test_acronyms
to_test = {
'this is an acronym: GPL(General Public License)' => 'this is an acronym: <acronym title="General Public License">GPL</acronym>',