faml 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +2 -0
  4. data/faml.gemspec +2 -1
  5. data/incompatibilities/README.md +29 -0
  6. data/incompatibilities/spec/compiler_newline_spec.md +31 -0
  7. data/incompatibilities/spec/render/attribute_spec.md +587 -0
  8. data/incompatibilities/spec/render/comment_spec.md +42 -0
  9. data/incompatibilities/spec/render/doctype_spec.md +22 -0
  10. data/incompatibilities/spec/render/element_spec.md +95 -0
  11. data/incompatibilities/spec/render/filters/cdata_spec.md +25 -0
  12. data/incompatibilities/spec/render/filters/coffee_spec.md +88 -0
  13. data/incompatibilities/spec/render/filters/css_spec.md +38 -0
  14. data/incompatibilities/spec/render/filters/escaped_spec.md +33 -0
  15. data/incompatibilities/spec/render/filters/javascript_spec.md +38 -0
  16. data/incompatibilities/spec/render/filters/markdown_spec.md +24 -0
  17. data/incompatibilities/spec/render/filters/preserve_spec.md +29 -0
  18. data/incompatibilities/spec/render/filters/sass_spec.md +59 -0
  19. data/incompatibilities/spec/render/filters/scss_spec.md +65 -0
  20. data/incompatibilities/spec/render/helpers_spec.md +17 -0
  21. data/incompatibilities/spec/render/indent_spec.md +21 -0
  22. data/incompatibilities/spec/render/multiline_spec.md +55 -0
  23. data/incompatibilities/spec/render/newline_spec.md +91 -0
  24. data/incompatibilities/spec/render/plain_spec.md +19 -0
  25. data/incompatibilities/spec/render/sanitize_spec.md +36 -0
  26. data/incompatibilities/spec/render/silent_script_spec.md +31 -0
  27. data/incompatibilities/spec/render/unescape_spec.md +56 -0
  28. data/lib/faml/indent_tracker.rb +39 -3
  29. data/lib/faml/parser.rb +2 -0
  30. data/lib/faml/version.rb +1 -1
  31. data/spec/render/element_spec.rb +0 -9
  32. data/spec/render/indent_spec.rb +47 -0
  33. data/spec/spec_helper.rb +21 -2
  34. data/spec/support/incompatibilities_generator.rb +132 -0
  35. metadata +53 -3
@@ -0,0 +1,59 @@
1
+ # [./spec/render/filters/sass_spec.rb:4](../../../../spec/render/filters/sass_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ :sass
5
+ nav
6
+ ul
7
+ margin: 0
8
+ content: "hello"
9
+
10
+ ```
11
+
12
+ ## Faml
13
+ ```html
14
+ <style>
15
+ nav ul {
16
+ margin: 0;
17
+ content: "hello"; }
18
+ </style>
19
+
20
+ ```
21
+
22
+ ## Haml, Hamlit
23
+ ```html
24
+ <style>
25
+ nav ul {
26
+ margin: 0;
27
+ content: "hello"; }
28
+ </style>
29
+
30
+ ```
31
+
32
+ # [./spec/render/filters/sass_spec.rb:17](../../../../spec/render/filters/sass_spec.rb#L17)
33
+ ## Input
34
+ ```haml
35
+ :sass
36
+ nav
37
+ ul
38
+ margin: #{0 + 5}px
39
+
40
+ ```
41
+
42
+ ## Faml
43
+ ```html
44
+ <style>
45
+ nav ul {
46
+ margin: 5px; }
47
+ </style>
48
+
49
+ ```
50
+
51
+ ## Haml, Hamlit
52
+ ```html
53
+ <style>
54
+ nav ul {
55
+ margin: 5px; }
56
+ </style>
57
+
58
+ ```
59
+
@@ -0,0 +1,65 @@
1
+ # [./spec/render/filters/scss_spec.rb:4](../../../../spec/render/filters/scss_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ :scss
5
+ nav {
6
+ ul {
7
+ margin: 0;
8
+ content: "hello";
9
+ }
10
+ }
11
+
12
+ ```
13
+
14
+ ## Faml
15
+ ```html
16
+ <style>
17
+ nav ul {
18
+ margin: 0;
19
+ content: "hello"; }
20
+
21
+ </style>
22
+
23
+ ```
24
+
25
+ ## Haml, Hamlit
26
+ ```html
27
+ <style>
28
+ nav ul {
29
+ margin: 0;
30
+ content: "hello"; }
31
+ </style>
32
+
33
+ ```
34
+
35
+ # [./spec/render/filters/scss_spec.rb:19](../../../../spec/render/filters/scss_spec.rb#L19)
36
+ ## Input
37
+ ```haml
38
+ :scss
39
+ nav {
40
+ ul {
41
+ margin: #{0 + 5}px;
42
+ }
43
+ }
44
+
45
+ ```
46
+
47
+ ## Faml
48
+ ```html
49
+ <style>
50
+ nav ul {
51
+ margin: 5px; }
52
+
53
+ </style>
54
+
55
+ ```
56
+
57
+ ## Haml, Hamlit
58
+ ```html
59
+ <style>
60
+ nav ul {
61
+ margin: 5px; }
62
+ </style>
63
+
64
+ ```
65
+
@@ -0,0 +1,17 @@
1
+ # [./spec/render/helpers_spec.rb:4](../../../spec/render/helpers_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ %span!= preserve "hello\nworld !"
5
+ ```
6
+
7
+ ## Faml, Haml
8
+ ```html
9
+ <span>hello&#x000A;world !</span>
10
+
11
+ ```
12
+
13
+ ## Hamlit (Error)
14
+ ```html
15
+ undefined method `preserve' for #<Object:0x00000003ec3a58>
16
+ ```
17
+
@@ -0,0 +1,21 @@
1
+ # [./spec/render/indent_spec.rb:41](../../../spec/render/indent_spec.rb#L41)
2
+ ## Input
3
+ ```haml
4
+ %p
5
+ %a
6
+
7
+ ```
8
+
9
+ ## Faml (Error)
10
+ ```html
11
+ Indentation with hard tabs are not allowed :-p
12
+ ```
13
+
14
+ ## Haml, Hamlit
15
+ ```html
16
+ <p>
17
+ <a></a>
18
+ </p>
19
+
20
+ ```
21
+
@@ -0,0 +1,55 @@
1
+ # [./spec/render/multiline_spec.rb:22](../../../spec/render/multiline_spec.rb#L22)
2
+ ## Input
3
+ ```haml
4
+ %p
5
+ foo |
6
+ bar |
7
+ baz |
8
+
9
+ ```
10
+
11
+ ## Faml, Haml
12
+ ```html
13
+ <p>
14
+ foo bar baz
15
+ </p>
16
+
17
+ ```
18
+
19
+ ## Hamlit
20
+ ```html
21
+ <p>
22
+ foo bar baz
23
+ </p>
24
+
25
+ ```
26
+
27
+ # [./spec/render/multiline_spec.rb:47](../../../spec/render/multiline_spec.rb#L47)
28
+ ## Input
29
+ ```haml
30
+ :javascript
31
+ hello |
32
+ world |
33
+ = __LINE__
34
+
35
+ ```
36
+
37
+ ## Faml, Haml
38
+ ```html
39
+ <script>
40
+ hello |
41
+ world |
42
+ </script>
43
+ 4
44
+
45
+ ```
46
+
47
+ ## Hamlit
48
+ ```html
49
+ <script>
50
+ hello world
51
+ </script>
52
+ 2
53
+
54
+ ```
55
+
@@ -0,0 +1,91 @@
1
+ # [./spec/render/newline_spec.rb:19](../../../spec/render/newline_spec.rb#L19)
2
+ ## Input
3
+ ```haml
4
+ %div
5
+ - 2.times do |i|
6
+ %span>= i
7
+
8
+ ```
9
+
10
+ ## Faml, Haml
11
+ ```html
12
+ <div><span>0</span><span>1</span></div>
13
+
14
+ ```
15
+
16
+ ## Hamlit
17
+ ```html
18
+ <div>
19
+ <span>0</span><span>1</span></div>
20
+
21
+ ```
22
+
23
+ # [./spec/render/newline_spec.rb:27](../../../spec/render/newline_spec.rb#L27)
24
+ ## Input
25
+ ```haml
26
+ %div
27
+ /
28
+ - 2.times do |i|
29
+ %span>= i
30
+
31
+ ```
32
+
33
+ ## Faml, Haml
34
+ ```html
35
+ <div>
36
+ <!--<span>0</span><span>1</span>-->
37
+ </div>
38
+
39
+ ```
40
+
41
+ ## Hamlit
42
+ ```html
43
+ <div>
44
+ <!--
45
+ <span>0</span><span>1</span>--></div>
46
+
47
+ ```
48
+
49
+ # [./spec/render/newline_spec.rb:36](../../../spec/render/newline_spec.rb#L36)
50
+ ## Input
51
+ ```haml
52
+ %div
53
+ / [if IE]
54
+ - 2.times do |i|
55
+ %span>= i
56
+
57
+ ```
58
+
59
+ ## Faml, Haml
60
+ ```html
61
+ <div>
62
+ <!--[if IE]><span>0</span><span>1</span><![endif]-->
63
+ </div>
64
+
65
+ ```
66
+
67
+ ## Hamlit
68
+ ```html
69
+ <div>
70
+ <!--[if IE]>
71
+ <span>0</span><span>1</span><![endif]--></div>
72
+
73
+ ```
74
+
75
+ # [./spec/render/newline_spec.rb:71](../../../spec/render/newline_spec.rb#L71)
76
+ ## Input
77
+ ```haml
78
+ %div(foo="bar") <b>hello</b>
79
+ ```
80
+
81
+ ## Faml, Haml
82
+ ```html
83
+ <div foo='bar'><b>hello</b></div>
84
+
85
+ ```
86
+
87
+ ## Hamlit (Error)
88
+ ```html
89
+ Generator supports only core expressions - found ["b>"]
90
+ ```
91
+
@@ -0,0 +1,19 @@
1
+ # [./spec/render/plain_spec.rb:8](../../../spec/render/plain_spec.rb#L8)
2
+ ## Input
3
+ ```haml
4
+ %span foo\\#{1 + 2}bar
5
+
6
+ ```
7
+
8
+ ## Faml, Haml
9
+ ```html
10
+ <span>foo\3bar</span>
11
+
12
+ ```
13
+
14
+ ## Hamlit
15
+ ```html
16
+ <span>foo\\3bar</span>
17
+
18
+ ```
19
+
@@ -0,0 +1,36 @@
1
+ # [./spec/render/sanitize_spec.rb:24](../../../spec/render/sanitize_spec.rb#L24)
2
+ ## Input
3
+ ```haml
4
+ &~ "<p>hello</p>"
5
+ ```
6
+
7
+ ## Faml, Haml
8
+ ```html
9
+ &lt;p&gt;hello&lt;/p&gt;
10
+
11
+ ```
12
+
13
+ ## Hamlit
14
+ ```html
15
+ &~ "<p>hello</p>"
16
+
17
+ ```
18
+
19
+ # [./spec/render/sanitize_spec.rb:24](../../../spec/render/sanitize_spec.rb#L24)
20
+ ## Input
21
+ ```haml
22
+ %span&~ "<p>hello</p>"
23
+ ```
24
+
25
+ ## Faml, Haml
26
+ ```html
27
+ <span>&lt;p&gt;hello&lt;/p&gt;</span>
28
+
29
+ ```
30
+
31
+ ## Hamlit
32
+ ```html
33
+ <span>~ "<p>hello</p>"</span>
34
+
35
+ ```
36
+
@@ -0,0 +1,31 @@
1
+ # [./spec/render/silent_script_spec.rb:51](../../../spec/render/silent_script_spec.rb#L51)
2
+ ## Input
3
+ ```haml
4
+ %div
5
+ - case
6
+ - when 1.even?
7
+ even
8
+ - when 2.even?
9
+ 2
10
+ even
11
+ - else
12
+ else
13
+
14
+ ```
15
+
16
+ ## Faml, Hamlit
17
+ ```html
18
+ <div>
19
+ 2
20
+ even
21
+ </div>
22
+
23
+ ```
24
+
25
+ ## Haml (Error)
26
+ ```html
27
+ (haml):9: syntax error, unexpected keyword_end, expecting end-of-input
28
+ ...upper if @haml_buffer;end;; end
29
+ ... ^
30
+ ```
31
+
@@ -0,0 +1,56 @@
1
+ # [./spec/render/unescape_spec.rb:17](../../../spec/render/unescape_spec.rb#L17)
2
+ ## Input
3
+ ```haml
4
+ !<p>hello</p>
5
+ ```
6
+
7
+ ## Faml
8
+ ```html
9
+ <p>hello</p>
10
+
11
+ ```
12
+
13
+ ## Haml, Hamlit
14
+ ```html
15
+ !<p>hello</p>
16
+
17
+ ```
18
+
19
+ # [./spec/render/unescape_spec.rb:33](../../../spec/render/unescape_spec.rb#L33)
20
+ ## Input
21
+ ```haml
22
+ !~ "<p>hello\n<pre>pre\nworld</pre></p>"
23
+ ```
24
+
25
+ ## Faml, Haml
26
+ ```html
27
+ <p>hello
28
+ <pre>pre&#x000A;world</pre></p>
29
+
30
+ ```
31
+
32
+ ## Hamlit
33
+ ```html
34
+ !~ "<p>hello\n<pre>pre\nworld</pre></p>"
35
+
36
+ ```
37
+
38
+ # [./spec/render/unescape_spec.rb:33](../../../spec/render/unescape_spec.rb#L33)
39
+ ## Input
40
+ ```haml
41
+ %span!~ "<p>hello\n<pre>pre\nworld</pre></p>"
42
+ ```
43
+
44
+ ## Faml, Haml
45
+ ```html
46
+ <span><p>hello
47
+ <pre>pre&#x000A;world</pre></p></span>
48
+
49
+ ```
50
+
51
+ ## Hamlit
52
+ ```html
53
+ <span>~ "<p>hello\n<pre>pre\nworld</pre></p>"</span>
54
+
55
+ ```
56
+