Commit 6ebffb6a authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Rename Tag#key to #tagname.

This way the class attribute @tagname corresponds to :tagname field
of the records produced by #parse_doc.
parent e8d3c654
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ module JsDuck
      @assets = Assets.new(@relations, @opts)

      # HACK: Give access to assets from @aside tag
      TagRegistry.get_by_key(:aside).assets = @assets
      TagRegistry.get_by_name(:aside).assets = @assets
    end

    def generate_export
+3 −3
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ module JsDuck
    #
    # Its main work is done through calling the #process_doc method of
    # all the Tag classes that have registered themselves to process a
    # particular set of @tags through defining a .key attribute.
    # particular set of @tags through defining a .tagname attribute.
    class Processor
      # Allow passing in filename and line for error reporting
      attr_accessor :filename
@@ -30,8 +30,8 @@ module JsDuck

        position = {:filename => @filename, :linenr => @linenr}

        doc_map.each_pair do |key, value|
          if tag = TagRegistry.get_by_key(key)
        doc_map.each_pair do |name, value|
          if tag = TagRegistry.get_by_name(name)
            tag.process_doc(hash, value, position)
          end
        end
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ module JsDuck

      def format_tags(context)
        TagRegistry.html_renderers.each do |tag|
          if context[tag.key]
          if context[tag.tagname]
            tag.format(context, @formatter)
          end
        end
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ module JsDuck

      # Initializes the tooltip text for the signature of @new tag.
      def init_new_tag_tooltip!
        signature = TagRegistry.get_by_key(:new).signature
        signature = TagRegistry.get_by_name(:new).signature
        if @opts[:new_since]
          signature[:tooltip] = "New since #{@opts[:new_since]}"
        elsif @opts[:imports].length > 0
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ module JsDuck
      # Returns array of rendered HTML.
      def self.render(member)
        TagRegistry.html_renderers.map do |tag|
          if member[tag.key]
          if member[tag.tagname]
            tag.to_html(member)
          else
            nil
Loading