Commit 83c8293f authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Restore HTML rendering of subproperties.

The rendering of @cfg, @property, @css_var subproperties got lost during
the previous refactorings.

Add a special Subproperties tag class to render the :properties field.
parent 0abbdab5
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
require "jsduck/tag/tag"
require "jsduck/subproperties"

module JsDuck::Tag
  # There is no @subproperties tag.
  #
  # This tag class exists solely to implement rendering of :properties
  # field which can exist in :cfg, :property or :css_var members.
  class Subproperties < Tag
    def initialize
      @key = :properties
      # Reuse the PARAMS position - a member either has properties or
      # params, not both.
      @html_position = POS_PARAMS
    end

    def to_html(m)
      JsDuck::Subproperties.render(m)
    end
  end
end