In HTML <link> and <img> tags have no end tag. In XHTML, on the contrary, these tags must be properly closed.
We can choose the appropriate behaviour with closed option:
image_tag "/images/foo.png", :alt => "Foo itself", :closed => true
The default value of closed option is false.
# File lib/sinatra/static_assets.rb, line 32 def image_tag(source, options = {}) options[:src] = url_for(source) tag("img", options) end
# File lib/sinatra/static_assets.rb, line 42 def javascript_script_tag(*sources) list, options = extract_options(sources) list.collect { |source| javascript_tag(source, options) }.join("\n") end
Generated with the Darkfish Rdoc Generator 2.