md_inc 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,9 +16,9 @@ module MdInc
16
16
 
17
17
  def process_lines(lines)
18
18
  lines.map do |line|
19
- (line[0] == '.') ? instance_eval(line[1..-1]) : line
19
+ (line.length > 1 && line[0] == '.') ? instance_eval(line[1..-1]) : line
20
20
  end
21
- end
21
+ end
22
22
 
23
23
  def x(*args)
24
24
  []
@@ -1,3 +1,3 @@
1
1
  module MdInc
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
data/spec/md_inc_spec.rb CHANGED
@@ -79,6 +79,11 @@ describe MdInc::TextProcessor do
79
79
  mdi.process(text).should == text
80
80
  end
81
81
 
82
+ it 'handles empty command' do
83
+ text = '.'
84
+ mdi.process(text).should == text
85
+ end
86
+
82
87
  it 'can require in plain old ruby files' do
83
88
  text = '.x require "set"'
84
89
  mdi.process(text).should == ''
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.2.8
4
+ version: 0.2.9
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-02-14 00:00:00.000000000 Z
12
+ date: 2013-03-11 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.