Commit 346f1420 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Render Markdown of object properties on export.

parent e51970d3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ module JsDuck
      end
      m[:params] = format_params(m[:params]) if m[:params]
      m[:return] = format_return(m[:return]) if m[:return]
      m[:properties] = format_subproperties(m[:properties]) if m[:properties]
      m
    end

@@ -61,6 +62,7 @@ module JsDuck
      params.map do |p|
        p = p.clone
        p[:doc] = @formatter.format(p[:doc]) if p[:doc]
        p[:properties] = format_subproperties(p[:properties]) if p[:properties]
        p
      end
    end
@@ -71,6 +73,15 @@ module JsDuck
      r
    end

    def format_subproperties(items)
      items.map do |it|
        it = it.clone
        it[:doc] = @formatter.format(it[:doc]) if it[:doc]
        it[:properties] = format_subproperties(it[:properties]) if it[:properties]
        it
      end
    end

  end

end