<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,8 @@
 Html5 on Rails
 =====
 
+by Daniel Morrison, Collective Idea
+
 This plugin is a bit of a playground to see what html goodies we can do. I'm implementing things as I desire them, and not in any normal order.
 
 Current Features
@@ -8,6 +10,8 @@ Current Features
 
 Since the type attributes for CSS and javascript tags have sensible defaults, we can omit them unless we need to override them.
 &lt;script src=&quot;/javascripts/all.js&quot;&gt;&lt;/script&gt;
-&lt;link href=&quot;/stylesheets/boilerplate.css?1238073247&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; /&gt;
+&lt;link href=&quot;/stylesheets/main.css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot;&gt;
+
+Don't self-close tags. This allows us to have &lt;img src=&quot;foo.png&quot;&gt; instead of &lt;img src=&quot;foo.png&quot; /&gt;. Of course you'll need that if you're serving your pages as application/xhtml+xml, but if you know what that means, you'll probably know how to override it.
 
 Copyright (c) 2009 Collective Idea, released under the MIT license</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
-# Include hook code here
-require 'html5'
\ No newline at end of file
+::SKIP_SELF_CLOSE_TAGS = true
+require 'html5'</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,34 @@ private
   # type attribute defaults to text/css so it can be omitted.
   # http://www.whatwg.org/specs/web-apps/current-work/#script
   def stylesheet_tag(source, options)
-    tag(&quot;link&quot;, { &quot;rel&quot; =&gt; &quot;stylesheet&quot;, &quot;media&quot; =&gt; &quot;screen&quot;, &quot;href&quot; =&gt; html_escape(path_to_stylesheet(source)) }.merge(options), false, false)
+    tag(&quot;link&quot;, { &quot;rel&quot; =&gt; &quot;stylesheet&quot;, &quot;media&quot; =&gt; &quot;screen&quot;, &quot;href&quot; =&gt; html_escape(path_to_stylesheet(source)) }.merge(options), ::SKIP_SELF_CLOSE_TAGS, false)
+  end
+  
+  def image_tag(source, options = {})
+    options.symbolize_keys!
+
+    options[:src] = path_to_image(source)
+    options[:alt] ||= File.basename(options[:src], '.*').split('.').first.to_s.capitalize
+
+    if size = options.delete(:size)
+      options[:width], options[:height] = size.split(&quot;x&quot;) if size =~ %r{^\d+x\d+$}
+    end
+
+    if mouseover = options.delete(:mouseover)
+      options[:onmouseover] = &quot;this.src='#{image_path(mouseover)}'&quot;
+      options[:onmouseout]  = &quot;this.src='#{image_path(options[:src])}'&quot;
+    end
+
+    tag(&quot;img&quot;, options, ::SKIP_SELF_CLOSE_TAGS)
+  end
+    
+  def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
+    tag(
+      &quot;link&quot;,
+      {&quot;rel&quot;   =&gt; tag_options[:rel] || &quot;alternate&quot;,
+      &quot;type&quot;  =&gt; tag_options[:type] || Mime::Type.lookup_by_extension(type.to_s).to_s,
+      &quot;title&quot; =&gt; tag_options[:title] || type.to_s.upcase,
+      &quot;href&quot;  =&gt; url_options.is_a?(Hash) ? url_for(url_options.merge(:only_path =&gt; false)) : url_options}, ::SKIP_SELF_CLOSE_TAGS
+    )
   end
 end
\ No newline at end of file</diff>
      <filename>lib/html5.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c305af424c07c4c1c95e65c79c9c76aa237abaf9</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Morrison</name>
    <email>daniel@collectiveidea.com</email>
  </author>
  <url>http://github.com/collectiveidea/html5/commit/5820bcc4f230371e21dc250a237aa4d93a115362</url>
  <id>5820bcc4f230371e21dc250a237aa4d93a115362</id>
  <committed-date>2009-04-04T09:37:06-07:00</committed-date>
  <authored-date>2009-04-04T09:37:06-07:00</authored-date>
  <message>Don't self-close img, or link when using Rails helpers.</message>
  <tree>14f9879b4bc20a0250f8dd3347e3a97a59d33eec</tree>
  <committer>
    <name>Daniel Morrison</name>
    <email>daniel@collectiveidea.com</email>
  </committer>
</commit>
