##// END OF EJS Templates
Fixed: inline images in wiki headings (#4112)....
Jean-Philippe Lang -
r2885:9943f64ff075
parent child
Show More
@@ -912,7 +912,7 class RedCloth3 < String
912 end
912 end
913
913
914 IMAGE_RE = /
914 IMAGE_RE = /
915 (<p>|\s|^) # start of line?
915 (>|\s|^) # start of line?
916 \! # opening
916 \! # opening
917 (\<|\=|\>)? # optional alignment atts
917 (\<|\=|\>)? # optional alignment atts
918 (#{C}) # optional style,class atts
918 (#{C}) # optional style,class atts
@@ -81,6 +81,19 class ApplicationHelperTest < HelperTestCase
81 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
81 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
82 end
82 end
83
83
84 def test_inline_images_inside_tags
85 raw = <<-RAW
86 h1. !foo.png! Heading
87
88 Centered image:
89
90 p=. !bar.gif!
91 RAW
92
93 assert textilizable(raw).include?('<img src="foo.png" alt="" />')
94 assert textilizable(raw).include?('<img src="bar.gif" alt="" />')
95 end
96
84 def test_acronyms
97 def test_acronyms
85 to_test = {
98 to_test = {
86 'this is an acronym: GPL(General Public License)' => 'this is an acronym: <acronym title="General Public License">GPL</acronym>',
99 'this is an acronym: GPL(General Public License)' => 'this is an acronym: <acronym title="General Public License">GPL</acronym>',
General Comments 0
You need to be logged in to leave comments. Login now