Commit 7335a6d4 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Ignoring @markdown tag in doc-comments.

JsDuck defaults to markdown anyway, so just ignore it.
parent 81cc4fc3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -96,6 +96,9 @@ module JsDuck
          boolean_at_tag(/@static/, :static)
        elsif look(/@(private|ignore|hide|protected)\b/)
          boolean_at_tag(/@(private|ignore|hide|protected)/, :private)
        elsif look(/@markdown\b/)
          # this is detected just to be ignored
          boolean_at_tag(/@markdown/, :markdown)
        elsif look(/@/)
          @current_tag[:doc] += @input.scan(/@/)
        elsif look(/[^@]/)
+17 −0
Original line number Diff line number Diff line
@@ -230,6 +230,23 @@ describe JsDuck::Aggregator do
    end
  end

  describe "class with @markdown" do
    before do
      @doc = parse(<<-EOS)[0]
        /**
         * @class MyClass
         * @markdown
         * Comment here.
         */
      EOS
    end

    it_should_behave_like "class"
    it "does not show @markdown tag in docs" do
      @doc[:doc].should == "Comment here."
    end
  end

  describe "member docs after class doc" do
    before do
      @classes = parse(<<-EOS)