app/helpers/lookbook/component_helper.rb in lookbook-1.0.4 vs app/helpers/lookbook/component_helper.rb in lookbook-1.0.5

- old
+ new

@@ -5,10 +5,10 @@ def icon(name, **attrs) render Lookbook::Icon::Component.new(name: name, **attrs) end def code(language = :html, **attrs, &block) - attrs[:language] = language + attrs[:language] ||= language render Lookbook::Code::Component.new(**attrs), &block end def render_component(ref, **attrs, &block) klass = component_class(ref)