md_inc 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/md_inc/md_inc_commands.rb +12 -3
- data/lib/md_inc/version.rb +1 -1
- metadata +2 -2
@@ -50,9 +50,18 @@ module MdInc
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def evaluate(string)
|
54
|
+
begin
|
55
|
+
instance_eval(string)
|
56
|
+
rescue
|
57
|
+
puts "Error evaluating #{string}"
|
58
|
+
puts $!
|
59
|
+
puts caller
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
53
63
|
def process_single_line_cmd(line)
|
54
|
-
|
55
|
-
instance_eval(line[1..-1])
|
64
|
+
evaluate(line[1..-1])
|
56
65
|
end
|
57
66
|
|
58
67
|
def process_multiline_cmd(line, lines)
|
@@ -63,7 +72,7 @@ module MdInc
|
|
63
72
|
lines.shift unless lines.empty?
|
64
73
|
save_content = @content
|
65
74
|
@content = content_lines
|
66
|
-
result =
|
75
|
+
result = evaluate(line[2..-1])
|
67
76
|
@content = @save_content
|
68
77
|
result
|
69
78
|
end
|
data/lib/md_inc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: md_inc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: MdInc is a simple text inclusion utility (it sucks in files) intended
|
15
15
|
for use with markdown and similar utilities.
|