octopress-image-caption-tag 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c655d35e300a5da18f87e18f518bc27fc1b346b
4
- data.tar.gz: 0aebbb4402551733b6c3c805842207451a3020e0
3
+ metadata.gz: 18f773669b08ac8f7d432d8c22ad9ec6ccea4033
4
+ data.tar.gz: e14a00cb811faf1e20ce5d9f043978b4689a2a0f
5
5
  SHA512:
6
- metadata.gz: b4f458c9899a1e275073512d655762d1e42a05275c85384064681ea659cc37ce0bb74071e7413c90b68e746eb4b3521cc787546f3d90e9c4d352e65df01b1801
7
- data.tar.gz: c9c98d2e03c18c2f05d032eee0934d9e0147f73840eefe92629daccfcd947cec258d66bcf2878ed16ef36893363eb18407e7508d4b48b074bab0c48cb0770956
6
+ metadata.gz: 91044264a1a7286b3f15ead206a86817e42f265d7ba23c830609d5cc05c4ecd70c8c50cb2165965acaa4527caa822738d5bf0ccbc6e51eab1e014c6737f7ecde
7
+ data.tar.gz: fa08e81f1d82a23e4c9ff19edfad889815a3b825aebccd561e06068f07ba50f36138b66f0875ba5ebd44b19815b536a5799248512a8dd14b52234438a1277cae
@@ -1,4 +1,6 @@
1
1
  # Changelog
2
+ ### 0.9.1 (2016-05-19)
3
+ - Fix for absolute width with fractional ems
2
4
  ### 0.9.0 (2016-05-18)
3
5
  - Add support for absolute sizing in ems
4
6
  - Confident enough to consider this a pre-release rather than pre-alpha
@@ -12,7 +12,7 @@ module Octopress
12
12
  module ImageCaptionTag
13
13
  module ImageCaptionFunctions
14
14
  def parse_sizes(raw_size)
15
- if /\s*(?<w>\d+%?(em)?)\s+(?<h>\d+%?(em)?)/ =~ raw_size
15
+ if /\s*(?<w>\d+(\.\d+)?%?(em)?)\s+(?<h>\d+(\.\d+)?%?(em)?)/ =~ raw_size
16
16
  @width = w
17
17
  @height = h
18
18
  elsif @class.rstrip == 'right' || @class.rstrip == 'left'
@@ -82,7 +82,7 @@ module Octopress
82
82
  @height = ''
83
83
 
84
84
  def initialize(tag_name, markup, tokens)
85
- if %r{(?<classname>\S.*\s+)?(?<protocol>https?://|/)(?<url>\S+)(?<sizes>\s+\d+%?(em)?\s+\d+%?(em)?)?(?<title>\s+.+)?} =~ markup
85
+ if %r{(?<classname>\S.*\s+)?(?<protocol>https?://|/)(?<url>\S+)(?<sizes>\s+\d+(\.\d+)?%?(em)?\s+\d+(\.\d+)?%?(em)?)?(?<title>\s+.+)?} =~ markup
86
86
  @class = classname || 'center'
87
87
  @img = "#{protocol}#{url}"
88
88
  @title = title.strip if title
@@ -116,7 +116,7 @@ module Octopress
116
116
  @height = ''
117
117
 
118
118
  def initialize(tag_name, markup, tokens)
119
- if %r{(?<classname>\S.*\s+)?(?<protocol>https?://|/)(?<url>\S+)(?<sizes>\s+\d+%?(em)?\s+\d+%?(em)?)?(?<title>\s+.+)?} =~ markup
119
+ if %r{(?<classname>\S.*\s+)?(?<protocol>https?://|/)(?<url>\S+)(?<sizes>\s+\d+(\.\d+)?%?(em)?\s+\d+(\.\d+)?%?(em)?)?(?<title>\s+.+)?} =~ markup
120
120
  @class = classname || 'center'
121
121
  @img = "#{protocol}#{url}"
122
122
  @title = title.strip if title
@@ -1,7 +1,7 @@
1
1
  module Octopress
2
2
  module Tags
3
3
  module ImageCaptionTag
4
- VERSION = '0.9.0'
4
+ VERSION = '0.9.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-image-caption-tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Beynon