tildoc 0.0.1 → 0.0.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: 089e11a656a839ea4f4d17a3433ed052fa05fb6b
4
- data.tar.gz: 64052cded4d3829786fd372943534f643e5c0020
3
+ metadata.gz: 0dd0347e6a67f5742cb02eda0ab9536317a3252a
4
+ data.tar.gz: ff13ad5510cff1bc2e6cdb231c5620626d1d31a7
5
5
  SHA512:
6
- metadata.gz: f174b5983885fcdfbff11a2eb6d16a75e40cd01c14a26d83bedf375b74599e2cdb3063f2dece4ba7bbc5d28fc2395805f61d7837a5936d0f1458fb4c241991f5
7
- data.tar.gz: 3c2945d96fd168da75c89d129dabdec81d91a73c47c7249c5910ecb714d8c7424e157241928f6a8f9e90b4e5ae4ebbfd141f43102ded028421e4e8b160c9a707
6
+ metadata.gz: 707cb08ef897336ea2c5a8f73534af1ee142b1c6a3d9a3daab41f863ff1d5eb80586b90c0810ac4cb865c703e71488d94adadf6b0c51a944bbb458481fac0092
7
+ data.tar.gz: 2bbd668d34c70d59488907ec7ab90418417c2029112c8f8c5bf58862b66572b7fb7001b881f331d91f2af4cc2373faa6c7610b64b13715ae323d5c0abb855ed2
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tildoc
2
2
 
3
- Add String#~ for removing leading margins of a heredoc.
3
+ Add String#~ for removing leading margins of heredocs.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,3 +1,3 @@
1
1
  module Tildoc
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/tildoc.rb CHANGED
@@ -2,8 +2,8 @@ require "tildoc/version"
2
2
 
3
3
  module Tildoc
4
4
  def ~
5
- margin = scan(/^ +/).map(&:size).min
6
- gsub(/^ {#{margin}}/, '')
5
+ margin = scan(/^[ \t]*(?=\S)/).map(&:size).min
6
+ gsub(/^[ \t]{#{margin}}/, '')
7
7
  end
8
8
  end
9
9
 
data/tildoc.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Tildoc::VERSION
9
9
  spec.authors = ["kyoendo"]
10
10
  spec.email = ["postagie@gmail.com"]
11
- spec.summary = %q{Add String#~ for removing leading margins of a heredoc.}
11
+ spec.summary = %q{Add String#~ for removing leading margins of heredocs.}
12
12
  spec.homepage = "https://github.com/melborne/tildoc"
13
13
  spec.license = "MIT"
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tildoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyoendo
@@ -76,5 +76,5 @@ rubyforge_project:
76
76
  rubygems_version: 2.2.2
77
77
  signing_key:
78
78
  specification_version: 4
79
- summary: Add String#~ for removing leading margins of a heredoc.
79
+ summary: Add String#~ for removing leading margins of heredocs.
80
80
  test_files: []