Please, see #290 for all details.
PR description at the time of opening this issue:
Problem
If we provide a tag which has a boolean value, we are unable to properly track the false case, since the "true" string appears with the tag name, but the "false" string does not show up. This is because of this logic, which checks for tag value presence:
|
def to_tags_list(tags) |
|
case tags |
|
when Hash |
|
tags.map do |name, value| |
|
if value |
|
escape_tag_content("#{name}:#{value}") |
|
else |
|
escape_tag_content(name) |
|
end |
true is evaluated to present, so we would add that tag name and value; however, false is evaluated to not present, so we would only add that tag name (not the value).
Solution
First, check for nil explicitly then also check for nil after converting to a string.
This does result in other values being deemed "present" now which were not previously though, such as [] and {}. Is this a problem though?
Please, see #290 for all details.
PR description at the time of opening this issue: