hlt 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/hlt.rb +18 -4
  5. metadata +37 -23
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac388db98dec0babe2de25523849632b9bd7f7fd
4
- data.tar.gz: fbe821366d39476dd2da627d5612cf7a8fa728bd
3
+ metadata.gz: e44d11f292e689a845792055e025a863e80901e5
4
+ data.tar.gz: 209b2614efe1d6686100f791a9edca251364ad66
5
5
  SHA512:
6
- metadata.gz: 76514da3acab7996d6cc495e0428a455f9ac96875df75f95db0e278acd20434e26fb13ed90f7f94bb4d4fadfb0eb0422e3065554e6583fee630d2a852e3e7cb2
7
- data.tar.gz: 27e818b65bc796b8658bd0b5b16002c7077f07f86d56d15161205b01aeb1ed4da6fc0d0a0cb1cc4e271e64062103ec05bfcae89ac5f8fad2bb81b794df2c8ad5
6
+ metadata.gz: 1f732bc51f93b3ad9c8f28efca38700c67bc46fe258cedf47604c62eecaeaef30836e0ece6016b11c4a7e15a2dfd3dff037993d3a05df20961b3751292ba7690
7
+ data.tar.gz: 6e614a175425594b6545606292bb4cf4544f3ab568dfaeb4f47eb260961b99582bc0eb46420f37baab02058faed345732efa5789f8f612bbd5c9b3a205443965
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/hlt.rb CHANGED
@@ -15,6 +15,7 @@ class Hlt
15
15
  #s = raw_s.lines.to_a.reject!{|x| x[/(^\s+\#\s)|(^\s*$)/] }
16
16
 
17
17
  s, markdown = fetch_markdown raw_s
18
+
18
19
  #s = raw_s
19
20
  # strip out the text from the line containing a comment
20
21
  s.gsub!(/((^#\s|\s#\s).*)/,'').strip if s[/((^#\s|\s#\s).*)/]
@@ -73,7 +74,7 @@ class Hlt
73
74
 
74
75
  prev_line = ''
75
76
  s = raw_s.lines.map {|line|
76
- line = prev_line + "\n" if line == "\n"
77
+ line = prev_line.to_s + "\n" if line == "\n"
77
78
  prev_line = line[/^\s+/]
78
79
  line
79
80
  }.join
@@ -83,9 +84,11 @@ class Hlt
83
84
  markdown = []
84
85
 
85
86
  s2 = s.lines.map do |line|
86
-
87
+
87
88
  if state == :markdown then
89
+
88
90
  spaces = line[/^\s+/].to_s.length
91
+
89
92
  if spaces > md_spaces then
90
93
  markdown[index] << line[(md_spaces + 2)..-1]
91
94
  line = ''
@@ -93,7 +96,18 @@ class Hlt
93
96
  markdown[index].strip!
94
97
  index += 1
95
98
  state = :default
96
- end
99
+
100
+ r = line[/^(\s+)markdown:/,1]
101
+
102
+ if r then
103
+
104
+ state = :markdown
105
+ md_spaces = r.length
106
+
107
+ line.sub!(/markdown:/,'\0' + index.to_s)
108
+ markdown[index] = ''
109
+ end
110
+ end
97
111
 
98
112
  else
99
113
 
@@ -116,4 +130,4 @@ class Hlt
116
130
  [s2.join, markdown]
117
131
  end
118
132
 
119
- end
133
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hlt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,55 +10,69 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTEzMDIwNjIwNTc0N1oXDTE0MDIwNjIwNTc0N1owSD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
+ ggEBAKVZjkuuOC3kajSEVXNHpAWAen5Ve0QjGl0l70pltQaLkT9kDYYgurwzd8h7
19
+ Km1r160qgpj0a1ulzmY29YqxSp9DRzYUlZ46G3Le7A6DTrto6l/EAU0BnDMXtbYn
20
+ qimtFQDmbfFJVmswHWdhB+JN/q4eK9cGr6tOW86fWMP2szh540G7pCpYm2jRSnP6
21
+ ATfusE3Xv7gnMmhPCtezOqdCLjnyiiGy+i2cKImExrnFLxWy62YCBBWBke/qBwwZ
22
+ Ym2kb2fbpBDQzyrzL07je0I0wzdzmMkkxAxKOgDKL5fwQ93a2sk8xG/b5A6qFiZ5
23
+ JQi1bSBqApcLqaaf56On8PaCKwcCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUwwYlyBnLo197yV+ejuQDkUqKLpswJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAaMpuNFyh
27
+ TNS8tsRPCAQeqMDTNicyn8xMT/2XggUqGZkUT9oLOp5Xg/oI7LRd+bRlS+XoZiR4
28
+ cds0HdIMyMeoQlZa41JvNXHg/V1+/2i43zE4sOwLuuOnO8z1NK2aVHIqMJtWEy+T
29
+ 3pq4EptBCbPQh42mSh+5lOSQmAVOpnSvpvX3/eO75oAqvyq3UtT5K1eyLS3E945f
30
+ SqzmSTFNGtTacMK4BZVp3uWksjQRbC60/vM8XG/XA+HA0bg3pVWbLInVd8HhldBc
31
+ 5IGsS5sdm4Kij1FAfaWjaheiPLOT6ZD3hDqkY+2utR6/Qt6eBqXnd4miH0BiZoIQ
32
+ U5u7D4Sb66WO1A==
31
33
  -----END CERTIFICATE-----
32
- date: 2013-10-09 00:00:00.000000000 Z
34
+ date: 2014-10-03 00:00:00.000000000 Z
33
35
  dependencies:
34
36
  - !ruby/object:Gem::Dependency
35
37
  name: line-tree
36
38
  requirement: !ruby/object:Gem::Requirement
37
39
  requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.3'
38
43
  - - ">="
39
44
  - !ruby/object:Gem::Version
40
- version: '0'
45
+ version: 0.3.17
41
46
  type: :runtime
42
47
  prerelease: false
43
48
  version_requirements: !ruby/object:Gem::Requirement
44
49
  requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.3'
45
53
  - - ">="
46
54
  - !ruby/object:Gem::Version
47
- version: '0'
55
+ version: 0.3.17
48
56
  - !ruby/object:Gem::Dependency
49
57
  name: rdiscount
50
58
  requirement: !ruby/object:Gem::Requirement
51
59
  requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '2.1'
52
63
  - - ">="
53
64
  - !ruby/object:Gem::Version
54
- version: '0'
65
+ version: 2.1.7.1
55
66
  type: :runtime
56
67
  prerelease: false
57
68
  version_requirements: !ruby/object:Gem::Requirement
58
69
  requirements:
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '2.1'
59
73
  - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: '0'
75
+ version: 2.1.7.1
62
76
  description:
63
77
  email: james@r0bertson.co.uk
64
78
  executables: []
@@ -78,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - ">="
80
94
  - !ruby/object:Gem::Version
81
- version: '0'
95
+ version: 2.1.2
82
96
  required_rubygems_version: !ruby/object:Gem::Requirement
83
97
  requirements:
84
98
  - - ">="
@@ -86,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
100
  version: '0'
87
101
  requirements: []
88
102
  rubyforge_project:
89
- rubygems_version: 2.0.0.rc.2
103
+ rubygems_version: 2.2.2
90
104
  signing_key:
91
105
  specification_version: 4
92
106
  summary: hlt
metadata.gz.sig CHANGED
Binary file