diff --git a/lib/inky/component_factory.rb b/lib/inky/component_factory.rb index 44d6be3..644f150 100644 --- a/lib/inky/component_factory.rb +++ b/lib/inky/component_factory.rb @@ -45,10 +45,11 @@ def _target_attribute(elem) def _transform_button(component, inner) expand = _has_class(component, 'expand') + attributes = _pass_through_attributes(component) if component.attr('href') target = _target_attribute(component) extra = ' align="center" class="float-center"' if expand - inner = %{#{inner}} + inner = %{#{inner}} end inner = "
#{inner}
" if expand diff --git a/spec/cases/button/with_extra_attr.inky b/spec/cases/button/with_extra_attr.inky new file mode 100644 index 0000000..9680147 --- /dev/null +++ b/spec/cases/button/with_extra_attr.inky @@ -0,0 +1,3 @@ + diff --git a/spec/cases/button/with_link.inky b/spec/cases/button/with_link.inky index 213c11e..37ddb11 100644 --- a/spec/cases/button/with_link.inky +++ b/spec/cases/button/with_link.inky @@ -1,3 +1,3 @@ - diff --git a/spec/cases/button/with_link_and_extra_attr.inky b/spec/cases/button/with_link_and_extra_attr.inky new file mode 100644 index 0000000..aa32b89 --- /dev/null +++ b/spec/cases/button/with_link_and_extra_attr.inky @@ -0,0 +1,3 @@ +