Commit adf51a7c authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Keep @throws documentation out of main method docs.

parent a4e89e7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ module JsDuck
    # Combines :doc-s of most tags
    # Ignores tags that have doc comment themselves and subproperty tags
    def detect_doc(docs)
      ignore_tags = [:param, :return, :meta]
      ignore_tags = [:param, :return, :throws, :meta]
      doc_tags = docs.find_all { |tag| !ignore_tags.include?(tag[:tagname]) && !subproperty?(tag) }
      doc_tags.map { |tag| tag[:doc] }.compact.join(" ")
    end
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ describe JsDuck::Aggregator do
    it "detects description" do
      @doc[:throws][0][:doc].should == "Some text\non multiple lines."
    end

    it "leaves documentation after @throws out of the main documentation" do
      @doc[:doc].should == "Some function"
    end
  end

  describe "@throws without type" do