jekyll-include_snippet 0.1.1 → 0.1.2

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: 630d507fa7567bd1c603300264fcad567d76edb0
4
- data.tar.gz: 0746efea8f3df62129a5c4642e8a880b48ac5b99
3
+ metadata.gz: cb7932037b39484d03356a384926c06b979d84ab
4
+ data.tar.gz: 3366224a0c3703f73e4c65398345d817dcd369ea
5
5
  SHA512:
6
- metadata.gz: 673b72138d6e810612186407efddf19fa2dc5db2925669fec59555f148db24b8d375b2ec3e8a79f70cd70833b6e612c77d8d815827d68dbe8d94dfd0f784e908
7
- data.tar.gz: 1844a9d618f20727d0475527ec400485946c41d6335dff2398ac2a0bac3b142b00584006cac5e59bbbb3f2c3444291c8259920a903cf9753ab0fd03741561cde
6
+ metadata.gz: a8d2f5773ff89da894e9a7850cf29deba329e9d48c9891ba4fe34a6936429adbb97a145f110b60e69ab99f1b419c0a2c538195c4c3bb43f4ab935eaf970cb623
7
+ data.tar.gz: 138b7dcb594b31d6475b6d15901d33634e88258dd60f521e1208456340631a56126f0f7baa5c05743ef97063b1d2365e3f96c2160fdfc327970b98d1adec3a58
@@ -48,10 +48,18 @@ module Jekyll
48
48
 
49
49
  def dedented_text
50
50
  lines
51
- .map { |l| l[indent..-1] }
51
+ .map { |line| dedent(line) }
52
52
  .join
53
53
  .rstrip
54
54
  end
55
+
56
+ def dedent(line)
57
+ if line.length >= indent
58
+ line[indent..-1]
59
+ else
60
+ line
61
+ end
62
+ end
55
63
  end
56
64
  end
57
65
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module IncludeSnippet
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-include_snippet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Dalling