lib/fdoc/presenters/schema_presenter.rb in fdoc-0.2.1 vs lib/fdoc/presenters/schema_presenter.rb in fdoc-0.2.2

- old
+ new

@@ -126,13 +126,21 @@ html = "" properties.each do |key, property| next if property.nil? html << '<li>' - html << '<tt>%s</tt>' % key + html << tag_with_anchor( + 'span', + '<tt>%s</tt>' % key, + schema_slug(key, property) + ) html << self.class.new(property, options.merge(:nested => true)).to_html html << '</li>' end html + end + + def schema_slug(key, property) + "#{key}-#{property.hash}" end end