erbal 1.0.rc2 → 1.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,7 +65,7 @@ inline void erbal_parser_tag_close_common(erbal_parser *parser, int tag_size) {
65
65
  }
66
66
 
67
67
  erbal_concat_chars_seen(parser, -tag_size);
68
- rb_str_buf_cat(parser->src, ";", 1);
68
+ rb_str_buf_cat(parser->src, ";\n", 2);
69
69
  }
70
70
 
71
71
  parser->state = OUTSIDE_TAG;
@@ -63,7 +63,7 @@ inline void erbal_parser_tag_close_common(erbal_parser *parser, int tag_size) {
63
63
  }
64
64
 
65
65
  erbal_concat_chars_seen(parser, -tag_size);
66
- rb_str_buf_cat(parser->src, ";", 1);
66
+ rb_str_buf_cat(parser->src, ";\n", 2);
67
67
  }
68
68
 
69
69
  parser->state = OUTSIDE_TAG;
@@ -24,7 +24,11 @@ describe Erbal do
24
24
  end
25
25
 
26
26
  it "should parse the <% tag" do
27
- erbal_parse("<% 1 + 1 %>").should == "@out = ''; 1 + 1 ;@out"
27
+ erbal_parse("<% 1 + 1 %>").should == "@out = ''; 1 + 1 ;\n@out"
28
+ end
29
+
30
+ it "should add a line break after <% %> tags incase the tags ended with a comment" do
31
+ erbal_parse("<% 1 + 1 # eeek comment! %> hi mom").should == "@out = ''; 1 + 1 # eeek comment! ;\n@out << %Q` hi mom`;@out"
28
32
  end
29
33
 
30
34
  it "should parse the <%= tag" do
@@ -44,7 +48,7 @@ describe Erbal do
44
48
  end
45
49
 
46
50
  it "should concat text surrounding the tags when the opening tag is <%" do
47
- erbal_parse("1 + 1 is <% 1 + 1 %>. Easy!").should == "@out = '';@out << %Q`1 + 1 is `; 1 + 1 ;@out << %Q`. Easy!`;@out"
51
+ erbal_parse("1 + 1 is <% 1 + 1 %>. Easy!").should == "@out = '';@out << %Q`1 + 1 is `; 1 + 1 ;\n@out << %Q`. Easy!`;@out"
48
52
  end
49
53
 
50
54
  it "should concat text surrounding the tags when the opening tag is <%=" do
@@ -2,7 +2,7 @@ require 'rake/gempackagetask'
2
2
  require 'yaml'
3
3
 
4
4
  WIN_SUFFIX = ENV['WIN_SUFFIX'] || 'i386-mswin32'
5
- ERBAL_VERSION = '1.0.rc2'
5
+ ERBAL_VERSION = '1.0.rc3'
6
6
 
7
7
  task :clean => :clobber_package
8
8
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erbal
3
3
  version: !ruby/object:Gem::Version
4
- hash: 977940503
4
+ hash: 977940500
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - rc2
10
- version: 1.0.rc2
9
+ - rc3
10
+ version: 1.0.rc3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian Leitch