faml 0.2.13 → 0.2.14

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.
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,42 @@
1
+ # [./spec/render/comment_spec.rb:31](../../../spec/render/comment_spec.rb#L31)
2
+ ## Input
3
+ ```haml
4
+ / [if IE] hello
5
+ ```
6
+
7
+ ## Faml, Haml
8
+ ```html
9
+ <!--[if IE]> hello <![endif]-->
10
+
11
+ ```
12
+
13
+ ## Hamlit
14
+ ```html
15
+ <!--[if IE] hello>
16
+ <![endif]-->
17
+
18
+ ```
19
+
20
+ # [./spec/render/comment_spec.rb:51](../../../spec/render/comment_spec.rb#L51)
21
+ ## Input
22
+ ```haml
23
+ /[[if IE]
24
+ ```
25
+
26
+ ## Faml (Error)
27
+ ```html
28
+ Unmatched brackets in conditional comment
29
+ ```
30
+
31
+ ## Haml (Error)
32
+ ```html
33
+ Unbalanced brackets.
34
+ ```
35
+
36
+ ## Hamlit
37
+ ```html
38
+ <!--[[if IE]>
39
+ <![endif]-->
40
+
41
+ ```
42
+
@@ -0,0 +1,22 @@
1
+ # [./spec/render/doctype_spec.rb:9](../../../spec/render/doctype_spec.rb#L9)
2
+ ## Input
3
+ ```haml
4
+ !!! xml
5
+ ```
6
+
7
+ ## Faml
8
+ ```html
9
+
10
+
11
+ ```
12
+
13
+ ## Haml
14
+ ```html
15
+
16
+ ```
17
+
18
+ ## Hamlit (Error)
19
+ ```html
20
+ Invalid xml directive in html mode
21
+ ```
22
+
@@ -0,0 +1,95 @@
1
+ # [./spec/render/element_spec.rb:63](../../../spec/render/element_spec.rb#L63)
2
+ ## Input
3
+ ```haml
4
+ %.foo
5
+ ```
6
+
7
+ ## Faml (Error)
8
+ ```html
9
+ Invalid element declaration
10
+ ```
11
+
12
+ ## Haml (Error)
13
+ ```html
14
+ Invalid tag: "%.foo".
15
+ ```
16
+
17
+ ## Hamlit
18
+ ```html
19
+ < class='foo'></>
20
+
21
+ ```
22
+
23
+ # [./spec/render/element_spec.rb:84](../../../spec/render/element_spec.rb#L84)
24
+ ## Input
25
+ ```haml
26
+ - @var = '</span>'
27
+ %span
28
+ hello <span> #@var </span>
29
+
30
+ ```
31
+
32
+ ## Faml
33
+ ```html
34
+ <span>
35
+ hello <span> &lt;/span&gt; </span>
36
+ </span>
37
+
38
+ ```
39
+
40
+ ## Haml, Hamlit
41
+ ```html
42
+ <span>
43
+ hello <span> #@var </span>
44
+ </span>
45
+
46
+ ```
47
+
48
+ # [./spec/render/element_spec.rb:117](../../../spec/render/element_spec.rb#L117)
49
+ ## Input
50
+ ```haml
51
+ %p/ hello
52
+ ```
53
+
54
+ ## Faml (Error)
55
+ ```html
56
+ Self-closing tags can't have content
57
+ ```
58
+
59
+ ## Haml (Error)
60
+ ```html
61
+ Self-closing tags can't have content.
62
+ ```
63
+
64
+ ## Hamlit
65
+ ```html
66
+ <p>
67
+
68
+ ```
69
+
70
+ # [./spec/render/element_spec.rb:121](../../../spec/render/element_spec.rb#L121)
71
+ ## Input
72
+ ```haml
73
+ %p/
74
+ hello
75
+
76
+ ```
77
+
78
+ ## Faml (Error)
79
+ ```html
80
+ Illegal nesting: nesting within a self-closing tag is illegal
81
+ ```
82
+
83
+ ## Haml (Error)
84
+ ```html
85
+ Illegal nesting: nesting within a self-closing tag is illegal.
86
+ ```
87
+
88
+ ## Hamlit
89
+ ```html
90
+ <p>
91
+ hello
92
+ </p>
93
+
94
+ ```
95
+
@@ -0,0 +1,25 @@
1
+ # [./spec/render/filters/cdata_spec.rb:4](../../../../spec/render/filters/cdata_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ :cdata
5
+ hello
6
+ #{'world'}
7
+ <span>hello</span>
8
+
9
+ ```
10
+
11
+ ## Faml, Haml
12
+ ```html
13
+ <![CDATA[
14
+ hello
15
+ world
16
+ <span>hello</span>
17
+ ]]>
18
+
19
+ ```
20
+
21
+ ## Hamlit (Error)
22
+ ```html
23
+ Filter "cdata" is not defined.
24
+ ```
25
+
@@ -0,0 +1,88 @@
1
+ # [./spec/render/filters/coffee_spec.rb:4](../../../../spec/render/filters/coffee_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ :coffee
5
+ square = (x) -> x * x
6
+ square(3)
7
+
8
+ ```
9
+
10
+ ## Faml
11
+ ```html
12
+ <script>
13
+ (function() {
14
+ var square;
15
+
16
+ square = function(x) {
17
+ return x * x;
18
+ };
19
+
20
+ square(3);
21
+
22
+ }).call(this);
23
+
24
+ </script>
25
+
26
+ ```
27
+
28
+ ## Haml, Hamlit
29
+ ```html
30
+ <script>
31
+ (function() {
32
+ var square;
33
+
34
+ square = function(x) {
35
+ return x * x;
36
+ };
37
+
38
+ square(3);
39
+
40
+ }).call(this);
41
+ </script>
42
+
43
+ ```
44
+
45
+ # [./spec/render/filters/coffee_spec.rb:15](../../../../spec/render/filters/coffee_spec.rb#L15)
46
+ ## Input
47
+ ```haml
48
+ :coffee
49
+ square = (x) -> x * x
50
+ square(#{1 + 2})
51
+
52
+ ```
53
+
54
+ ## Faml
55
+ ```html
56
+ <script>
57
+ (function() {
58
+ var square;
59
+
60
+ square = function(x) {
61
+ return x * x;
62
+ };
63
+
64
+ square(3);
65
+
66
+ }).call(this);
67
+
68
+ </script>
69
+
70
+ ```
71
+
72
+ ## Haml, Hamlit
73
+ ```html
74
+ <script>
75
+ (function() {
76
+ var square;
77
+
78
+ square = function(x) {
79
+ return x * x;
80
+ };
81
+
82
+ square(3);
83
+
84
+ }).call(this);
85
+ </script>
86
+
87
+ ```
88
+
@@ -0,0 +1,38 @@
1
+ # [./spec/render/filters/css_spec.rb:24](../../../../spec/render/filters/css_spec.rb#L24)
2
+ ## Input
3
+ ```haml
4
+ %div
5
+ :css
6
+ %span hello
7
+
8
+ ```
9
+
10
+ ## Faml
11
+ ```html
12
+ <div>
13
+ <span>hello</span>
14
+ </div>
15
+
16
+ ```
17
+
18
+ ## Haml
19
+ ```html
20
+ <div>
21
+ <style>
22
+
23
+ </style>
24
+ </div>
25
+
26
+ ```
27
+
28
+ ## Hamlit
29
+ ```html
30
+ <div>
31
+ <style>
32
+
33
+ </style>
34
+ <span>hello</span>
35
+ </div>
36
+
37
+ ```
38
+
@@ -0,0 +1,33 @@
1
+ # [./spec/render/filters/escaped_spec.rb:4](../../../../spec/render/filters/escaped_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ %span start
5
+ :escaped
6
+ hello
7
+ #{'<p>world</p>'}
8
+ <span>hello</span>
9
+ %span end
10
+
11
+ ```
12
+
13
+ ## Faml, Haml
14
+ ```html
15
+ <span>start</span>
16
+ hello
17
+ &lt;p&gt;world&lt;/p&gt;
18
+ &lt;span&gt;hello&lt;/span&gt;
19
+
20
+ <span>end</span>
21
+
22
+ ```
23
+
24
+ ## Hamlit
25
+ ```html
26
+ <span>start</span>
27
+ hello
28
+ &lt;p&gt;world&lt;/p&gt;
29
+ &lt;span&gt;hello&lt;/span&gt;
30
+ <span>end</span>
31
+
32
+ ```
33
+
@@ -0,0 +1,38 @@
1
+ # [./spec/render/filters/javascript_spec.rb:23](../../../../spec/render/filters/javascript_spec.rb#L23)
2
+ ## Input
3
+ ```haml
4
+ %div
5
+ :javascript
6
+ %span world
7
+
8
+ ```
9
+
10
+ ## Faml
11
+ ```html
12
+ <div>
13
+ <span>world</span>
14
+ </div>
15
+
16
+ ```
17
+
18
+ ## Haml
19
+ ```html
20
+ <div>
21
+ <script>
22
+
23
+ </script>
24
+ </div>
25
+
26
+ ```
27
+
28
+ ## Hamlit
29
+ ```html
30
+ <div>
31
+ <script>
32
+
33
+ </script>
34
+ <span>world</span>
35
+ </div>
36
+
37
+ ```
38
+
@@ -0,0 +1,24 @@
1
+ # [./spec/render/filters/markdown_spec.rb:12](../../../../spec/render/filters/markdown_spec.rb#L12)
2
+ ## Input
3
+ ```haml
4
+ :markdown
5
+ # #{'hello'}
6
+ world
7
+
8
+ ```
9
+
10
+ ## Faml, Hamlit
11
+ ```html
12
+ <h1>hello</h1>
13
+ world
14
+
15
+ ```
16
+
17
+ ## Haml
18
+ ```html
19
+ <h1>hello</h1>
20
+
21
+ world
22
+
23
+ ```
24
+
@@ -0,0 +1,29 @@
1
+ # [./spec/render/filters/preserve_spec.rb:4](../../../../spec/render/filters/preserve_spec.rb#L4)
2
+ ## Input
3
+ ```haml
4
+ %span start
5
+ :preserve
6
+ hello
7
+ #{"<p>wor\nld</p>"}
8
+ <span>hello</span>
9
+ %span end
10
+
11
+ ```
12
+
13
+ ## Faml, Haml
14
+ ```html
15
+ <span>start</span>
16
+ hello&#x000A; <p>wor&#x000A;ld</p>&#x000A;<span>hello</span>
17
+ <span>end</span>
18
+
19
+ ```
20
+
21
+ ## Hamlit
22
+ ```html
23
+ <span>start</span>
24
+ hello&#x000A; &lt;p&gt;wor
25
+ ld&lt;/p&gt;&#x000A;<span>hello</span>
26
+ <span>end</span>
27
+
28
+ ```
29
+