diff --git a/lib/erb/formatter.rb b/lib/erb/formatter.rb index 193620c..d382c02 100644 --- a/lib/erb/formatter.rb +++ b/lib/erb/formatter.rb @@ -135,6 +135,10 @@ def format_attributes(tag_name, attrs, tag_closing) attrs.scan(ATTR).flatten.each do |attr| attr.strip! + if UNQUOTED_ATTR =~ attr + attr_html << indented(attr) + next + end name, value = attr.split('=', 2) if value.nil? diff --git a/test/fixtures/attributes.html.erb b/test/fixtures/attributes.html.erb new file mode 100644 index 0000000..68c1352 --- /dev/null +++ b/test/fixtures/attributes.html.erb @@ -0,0 +1,8 @@ +Responsive Image diff --git a/test/fixtures/attributes.html.expected.erb b/test/fixtures/attributes.html.expected.erb new file mode 100644 index 0000000..4d51908 --- /dev/null +++ b/test/fixtures/attributes.html.expected.erb @@ -0,0 +1,7 @@ +Responsive Image