martile 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/martile.rb +3 -3
  2. metadata +24 -3
@@ -37,10 +37,10 @@ class Martile
37
37
  def numbered_list_to_html(s)
38
38
 
39
39
  s.split(/(?=\[#)/).map do |x|
40
- if x.strip.length > 0 then
40
+ s2, remainder = [x[/\[#.*#[^\]]+\]/m], ($').to_s] if x.strip.length > 0
41
+ if s2 then
41
42
 
42
- s, remainder = x[/\[#.*#[^\]]+\]/m], ($').to_s
43
- raw_list = s[1..-2].split(/^#/).reject(&:empty?).map(&:strip)
43
+ raw_list = s2[1..-2].split(/^#/).reject(&:empty?).map(&:strip)
44
44
  list = "<ol>%s</ol>" % raw_list.map {|x| "<li>%s</li>" % x}.join
45
45
 
46
46
  list + remainder.to_s
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: martile
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -12,8 +12,29 @@ cert_chain: []
12
12
 
13
13
  date: 2011-08-27 00:00:00 +01:00
14
14
  default_executable:
15
- dependencies: []
16
-
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rexle-builder
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexle
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ version_requirements: *id002
17
38
  description:
18
39
  email:
19
40
  executables: []