Commit 769e14c0 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Remove the special case for ignoring @example tag.

It's now ignored together with all other possible tags within code
example blocks.
parent 5b08c1aa
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -148,8 +148,6 @@ module JsDuck
          boolean_at_tag(/@accessor/, :accessor)
        elsif look(/@evented\b/)
          boolean_at_tag(/@evented/, :evented)
        elsif look(/@example\b/)
          at_example
        elsif look(/@/)
          other_at_tag
        elsif look(/[^@]/)
@@ -227,12 +225,6 @@ module JsDuck
      end
    end

    # A special case for @example tag,
    # which we leave as is to be processed later in DocFormatter
    def at_example
      @current_tag[:doc] += match(/@example/) + skip_white
    end

    # matches @class name ...
    def at_class
      match(/@class/)
+4 −2
Original line number Diff line number Diff line
@@ -149,11 +149,13 @@ describe JsDuck::DocParser do
  describe "@example tag" do
    before do
      @tag = parse_single(<<-EOS.strip)[0]
         * Code:
         *
         *     @example blah
      EOS
    end
    it "is treated as plain text, to be processed later" do
      @tag[:doc].should == "@example blah"
      @tag[:doc].should == "Code:\n\n    @example blah"
    end
  end