Commit 2971197e authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Autolinking method parameter and return types.

When parameter or return type matches a classname included to
docs, a link to it is created.
parent 56fbbef1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,9 +17,10 @@ module JsDuck

    def render_single(param)
      doc = @formatter.format(param[:doc])
      type = @formatter.replace(param[:type])
      return [
        "<li>",
        "<code>#{param[:name]}</code> : #{param[:type]}",
        "<code>#{param[:name]}</code> : #{type}",
        "<div class='sub-desc'>#{doc}</div>",
        "</li>",
      ].join("")
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ module JsDuck
    end

    def render_return(item)
      type = item[:return][:type]
      type = @formatter.replace(item[:return][:type])
      doc = @formatter.format(item[:return][:doc])
      if type == "void" && doc.length == 0
        "<ul><li>void</li></ul>"