Loading lib/jsduck/doc_ast.rb +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading spec/aggregator_throws_spec.rb +4 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
lib/jsduck/doc_ast.rb +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
spec/aggregator_throws_spec.rb +4 −0 Original line number Diff line number Diff line Loading @@ -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 Loading