Skip to content

Commit

Permalink
Tighten up emit_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
noteflakes committed Mar 7, 2024
1 parent 82bb004 commit 70846af
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/papercraft/tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,8 @@ def emit_attributes(attributes)
@buffer << S_SPACE << att_repr(k)
when false, nil
# emit nothing
when Array
v = v.join(S_SPACE)
@buffer << S_SPACE << att_repr(k) <<
S_EQUAL_QUOTE << escape_text(v) << S_QUOTE
else
v = v.join(S_SPACE) if v.is_a?(Array)
@buffer << S_SPACE << att_repr(k) <<
S_EQUAL_QUOTE << escape_text(v) << S_QUOTE
end
Expand Down

0 comments on commit 70846af

Please sign in to comment.