lib/img_props.rb in jekyll_img-0.1.1 vs lib/img_props.rb in jekyll_img-0.1.2
- old
+ new
@@ -24,11 +24,11 @@
def attr_nofollow
" rel='nofollow'" if @nofollow
end
def attr_size_class
- return nil if @size.nil? || size_unit_specified?
+ return nil if @size == false || @size.nil? || size_unit_specified?
abort "'#{@size}' is not a recognized size; must be one of #{SIZES.join(', ')}, or an explicit unit." \
unless SIZES.include?(@size)
@size
end
@@ -84,10 +84,10 @@
end
UNITS = %w[Q ch cm em dvh dvw ex in lh lvh lvw mm pc px pt rem rlh svh svw vb vh vi vmax vmin vw %].freeze
def size_unit_specified?
- return false if @size.to_s.strip.empty?
+ return false if @size == false || @size.to_s.strip.empty?
@size.end_with?(*UNITS)
end
def url?(src)