templates/default/fulldoc/markdown/setup.rb in yard-markdown-0.3.4 vs templates/default/fulldoc/markdown/setup.rb in yard-markdown-0.3.5
- old
+ new
@@ -99,11 +99,11 @@
<% end %><% [[:class, "Extended by"], [:instance, "Includes"]].each do |scope, name| %>
<% if (mix = run_verifier(object.mixins(scope))).size > 0 %>
**<%= name %>:** <%= mix.sort_by {|o| o.path }.join(", ") %>
<% end %><% end %>
<% unless object.root? %>
-**Defined in:** <%= object.file ? object.file.sub(Dir.pwd, '') : "(unknown)" %>
+**Defined in:** <%= object.file ? object.file.sub(Dir.pwd, "") : "(unknown)" %>
<% end %>
<%= rdoc_to_md object.docstring %>
<% if (insmeths = public_instance_methods(object)).size > 0 %>
@@ -136,15 +136,17 @@
# <%= name %>
<% list.each do |cnst| %>
## <%= cnst.name %> [](#<%=aref(cnst)%>)
<%= rdoc_to_md cnst.docstring %>
-<% end %><% end %><% end %>', trim_mode: "<>")
+<% end %><% end %><% end %>',
+ trim_mode: "<>",
+ )
template.result(binding)
end
-require 'rdoc'
+require "rdoc"
def rdoc_to_md(docstring)
RDoc::Markup::ToMarkdown.new.convert(docstring)
end