martile 0.5.1 → 0.5.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: 997c1e5db4f7dc46318233c3ab2aefd96c0ae8a3
4
- data.tar.gz: 4026335dba1d276b0e9e62acb9e9de0ef614a31c
3
+ metadata.gz: 01b23235b15c7468a6779f02872a2375723e3077
4
+ data.tar.gz: c36630de67c9cfcb0f87eab6eb2f9ac1cf5d6078
5
5
  SHA512:
6
- metadata.gz: 1485697a0c44b5db0999dee8e2cb666966b75d29d0bacb4ccfec05b34f17df38f0058cab74bdad882a94a1b9da9adf0c01fdfe3887e8a772d8e01bf5685fa098
7
- data.tar.gz: 206a118949959af71518b4f701679088b2c98cf1ed737e776f3da7fd1730de23d9a3c08fee2ba92c31166ace716a71b515145f815680ca1af2ee72b3858ab99a
6
+ metadata.gz: 11acfe222c8af3d9b6642b0f4255a50c8cea1c7e0b1db94b35080320143292aa99007beb3854006c86020d1bc277c3e99bafb4c955eda4230e93f69ff2930ed9
7
+ data.tar.gz: 0c6000b5d84337991d49e0e17f8c8d21e80dc688b1f5182b34a301e03efe3e87abbe27f44fea3d52d814faadf066aee3a1c27b9e9e4370b3682d72e9513bfbf8
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/martile.rb CHANGED
@@ -8,6 +8,8 @@ require 'dynarex'
8
8
  require 'rdiscount'
9
9
 
10
10
 
11
+ # bug fix: 14-Mar-2015: A section can now be
12
+ # written without an error occurring
11
13
  # bug fix: 11-Mar-2015: Escapes angle brackets within a code block *before*
12
14
  # the string is passed to Rexle
13
15
  # bug fix: A new line character is now added after the creation
@@ -273,15 +275,15 @@ class Martile
273
275
  end
274
276
 
275
277
  def section(s)
276
-
278
+
277
279
  a = s.lines
278
280
  a2 = a.inject([[]]) do |r,x|
279
281
 
280
282
  match = x.match(/^=[^=]#?(\w+)?/)
281
283
 
282
284
  if match then
283
-
284
- if r.last.first[/<section/] then
285
+
286
+ if r.last.length > 0 and r.last.first[/<section/] then
285
287
 
286
288
  list = r.pop
287
289
  r << ["%s%s</section>" %
@@ -303,4 +305,4 @@ class Martile
303
305
  a2.join
304
306
  end
305
307
 
306
- end
308
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: martile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  fnr5l+RI/6f8lfxBNgDrktGB/RwPkOyWtyKk1tu9CWgHmptxL0JglikCXg5MzuZI
32
32
  tZzXOvXUoUf1VQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-03-11 00:00:00.000000000 Z
34
+ date: 2015-03-14 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdiscount
metadata.gz.sig CHANGED
Binary file