html2slim 0.0.8 → 0.1.0

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: 28bcd8f53ea559fa98de58411e7a05d798b9f34a
4
- data.tar.gz: 73b83d8151046b9490517db175ffe8e0246c4c5e
3
+ metadata.gz: 92360cf53a75f08b0e372a7bbf5b1fbdf90f14c9
4
+ data.tar.gz: bc66571eda6425917a0d852159b80bb6d09b40b5
5
5
  SHA512:
6
- metadata.gz: fc892a892be65315ddd54423431731f6aff146860437826bc2a708f67a8c2651fc860bb1c65b5332a5a5c6fe5f4d6975e460a327becb73ebec7c213ba9a82978
7
- data.tar.gz: ee218a556404152cd3df416aff6bdb1e6541ab80917f7173b7417c5d62e30af2f7a417ed15cb2d884c46b736a9af322659f89a0e2247de8cef80eefa8e37d61b
6
+ metadata.gz: ae76f214220ea64f8562053c3875b3f2d91767b4baf3349f88698b8a66b0741bfd656acd46433ca65145f348dd4a08deaac2f61700627f177819f1d8027aab60
7
+ data.tar.gz: c4eb43351f545c0eb9b1c20c49fb47423701af129f0fd4558f87e359451d9fe76354a8edbdeb18b0263642a88b01c4e72e29008ff8ba206c4115fce9589de878
@@ -27,7 +27,7 @@ module HTML2Slim
27
27
  # when
28
28
  erb.gsub!(/<%-?\s*(when .+?)\s*-?%>/){ %(</ruby><ruby code="#{$1}">) }
29
29
  erb.gsub!(/<%\s*(end|}|end\s+-)\s*%>/, %(</ruby>))
30
- erb.gsub!(/<%(.+?)\s*-?%>/m){ %(<ruby code="#{$1.gsub(/"/, '&quot;')}"></ruby>) }
30
+ erb.gsub!(/<%(.+?)\s*%>/){ %(<ruby code="#{$1.gsub(/"/, '&quot;')}"></ruby>) }
31
31
  @slim ||= Hpricot(erb).to_slim
32
32
  end
33
33
  end
@@ -47,7 +47,7 @@ class Hpricot::Elem
47
47
  def slim(lvl=0)
48
48
  r = ' ' * lvl
49
49
 
50
- return r + slim_ruby_code(r) if ruby?
50
+ return r + slim_ruby_code if ruby?
51
51
 
52
52
  r += name unless skip_tag_name?
53
53
  r += slim_id
@@ -66,8 +66,8 @@ class Hpricot::Elem
66
66
 
67
67
  private
68
68
 
69
- def slim_ruby_code(r)
70
- (code.strip[0] == "=" ? "" : "- ") + code.strip.gsub(/\n/, "\n#{r}- ")
69
+ def slim_ruby_code
70
+ (code.strip[0] == "=" ? "" : "- ") + code.strip
71
71
  end
72
72
 
73
73
  def code
@@ -1,3 +1,3 @@
1
1
  module HTML2Slim
2
- VERSION = '0.0.8'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maiz Lulkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-18 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hpricot
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: slim
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.0.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.0.0
69
69
  description: Convert HTML to Slim templates. Because HTML sux and Slim rules. That's
@@ -90,22 +90,22 @@ licenses: []
90
90
  metadata: {}
91
91
  post_install_message:
92
92
  rdoc_options:
93
- - "--charset=UTF-8"
93
+ - --charset=UTF-8
94
94
  require_paths:
95
95
  - lib
96
96
  required_ruby_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - ">="
98
+ - - '>='
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ">="
103
+ - - '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.2.2
108
+ rubygems_version: 2.0.6
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: HTML to Slim converter.