hamlit 1.5.4 → 1.5.5
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.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/CHANGELOG.md +6 -0
- data/Rakefile +5 -0
- data/doc/README.md +10 -0
- data/doc/engine/old_attributes.md +68 -0
- data/doc/engine/script.md +105 -0
- data/doc/engine/text.md +88 -0
- data/doc/filters/coffee.md +125 -0
- data/doc/filters/erb.md +31 -0
- data/doc/filters/javascript.md +83 -0
- data/doc/filters/less.md +57 -0
- data/doc/filters/markdown.md +31 -0
- data/doc/filters/plain.md +25 -0
- data/doc/filters/sass.md +62 -0
- data/doc/filters/scss.md +68 -0
- data/hamlit.gemspec +1 -1
- data/lib/hamlit/engine.rb +1 -10
- data/lib/hamlit/parser.rb +11 -6
- data/lib/hamlit/parsers/multiline.rb +1 -1
- data/lib/hamlit/parsers/text.rb +2 -1
- data/lib/hamlit/version.rb +1 -1
- data/spec/hamlit/engine/indent_spec.rb +1 -1
- data/spec/hamlit/engine/multiline_spec.rb +2 -2
- data/spec/hamlit/engine/new_attribute_spec.rb +2 -2
- data/spec/hamlit/engine/old_attributes_spec.rb +17 -7
- data/spec/hamlit/engine/silent_script_spec.rb +4 -4
- data/spec/hamlit/engine/tag_spec.rb +0 -62
- data/spec/hamlit/engine/text_spec.rb +96 -15
- data/spec/hamlit/filters/plain_spec.rb +15 -0
- data/spec/spec_helper.rb +183 -40
- data/test +3 -0
- metadata +17 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 09c67291b717aed2f4abdb969b241ad01c2b4a86
|
|
4
|
+
data.tar.gz: 967a7bbec042fc5cf64d38ee1ddb875cd3924db6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53ff948040ff7cd703fe6ece4553784dd2c27688e4d9d0916bb2b926bbf7f571d82d807887bbc723b700effa0f37f242a2d5704567f0ee70402571378735f00f
|
|
7
|
+
data.tar.gz: 2f543243ba2104ae0de56b2d3f17ff4f07fe0364655dead47d0ef4ff79b5d2aff6f87cb585f73c1dd1afdc9a72ec2a4563e703e78894f6002eb1d165b8c7f25f
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
|
@@ -10,6 +10,11 @@ task :spec do
|
|
|
10
10
|
exit system('bundle exec rspec --pattern spec/hamlit/**{,/\*/\*\*\}/\*_spec.rb')
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
desc 'Automatically generate documents from rspec'
|
|
14
|
+
task :doc do
|
|
15
|
+
system('AUTODOC=1 bundle exec rake spec')
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
namespace :spec do
|
|
14
19
|
desc 'Generate converted ugly haml-spec'
|
|
15
20
|
task :update do
|
data/doc/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Hamlit incompatibilities
|
|
2
|
+
|
|
3
|
+
This is a document generated from RSpec test cases.
|
|
4
|
+
Showing incompatibilities against [Haml](https://github.com/haml/haml) and [Faml](https://github.com/eagletmt/faml).
|
|
5
|
+
|
|
6
|
+
## engine
|
|
7
|
+
|
|
8
|
+
- [engine/old\_attributes\_spec.rb](https://github.com/k0kubun/hamlit/blob/master/doc/engine/old_attributes.md)
|
|
9
|
+
- [engine/script\_spec.rb](https://github.com/k0kubun/hamlit/blob/master/doc/engine/script.md)
|
|
10
|
+
- [engine/text\_spec.rb](https://github.com/k0kubun/hamlit/blob/master/doc/engine/text.md)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# [old\_attributes\_spec.rb:43](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/old_attributes_spec.rb#L43)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
%span{ class: '}}}', id: '{}}' } }{
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Output
|
|
9
|
+
### Haml
|
|
10
|
+
```html
|
|
11
|
+
Haml::SyntaxError: (haml):1: syntax error, unexpected tSTRING_DEND, expecting ')'
|
|
12
|
+
...l, class: ')}>}}', id: '{}}' } }{</span>\n";;_erbout
|
|
13
|
+
... ^
|
|
14
|
+
(haml):1: unterminated regexp meets end of file
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Faml
|
|
18
|
+
```html
|
|
19
|
+
Faml::Compiler::UnparsableRubyCode: Unparsable Ruby code is given to attributes: class: '
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Hamlit
|
|
23
|
+
```html
|
|
24
|
+
<span class='}}}' id='{}}'>}{</span>
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# [old\_attributes\_spec.rb:201](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/old_attributes_spec.rb#L201)
|
|
30
|
+
## Input
|
|
31
|
+
```haml
|
|
32
|
+
/ wontfix: Non-boolean attributes are not escaped for optimization.
|
|
33
|
+
- val = false
|
|
34
|
+
%a{ href: val }
|
|
35
|
+
- val = nil
|
|
36
|
+
%a{ href: val }
|
|
37
|
+
|
|
38
|
+
/ Boolean attributes are escaped correctly.
|
|
39
|
+
- val = false
|
|
40
|
+
%a{ disabled: val }
|
|
41
|
+
- val = nil
|
|
42
|
+
%a{ disabled: val }
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
### Haml, Faml
|
|
48
|
+
```html
|
|
49
|
+
<!-- wontfix: Non-boolean attributes are not escaped for optimization. -->
|
|
50
|
+
<a></a>
|
|
51
|
+
<a></a>
|
|
52
|
+
<!-- Boolean attributes are escaped correctly. -->
|
|
53
|
+
<a></a>
|
|
54
|
+
<a></a>
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Hamlit
|
|
59
|
+
```html
|
|
60
|
+
<!-- wontfix: Non-boolean attributes are not escaped for optimization. -->
|
|
61
|
+
<a href='false'></a>
|
|
62
|
+
<a href=''></a>
|
|
63
|
+
<!-- Boolean attributes are escaped correctly. -->
|
|
64
|
+
<a></a>
|
|
65
|
+
<a></a>
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# [script\_spec.rb:41](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/script_spec.rb#L41)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
= 3.times do |i|
|
|
5
|
+
= i
|
|
6
|
+
4
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Output
|
|
11
|
+
### Haml, Faml
|
|
12
|
+
```html
|
|
13
|
+
0
|
|
14
|
+
1
|
|
15
|
+
2
|
|
16
|
+
34
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Hamlit
|
|
21
|
+
```html
|
|
22
|
+
0
|
|
23
|
+
1
|
|
24
|
+
2
|
|
25
|
+
3
|
|
26
|
+
4
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# [script\_spec.rb:55](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/script_spec.rb#L55)
|
|
32
|
+
## Input
|
|
33
|
+
```haml
|
|
34
|
+
%span
|
|
35
|
+
= 1.times do |i|
|
|
36
|
+
= i
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Output
|
|
41
|
+
### Haml, Faml
|
|
42
|
+
```html
|
|
43
|
+
<span>
|
|
44
|
+
0
|
|
45
|
+
1</span>
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Hamlit
|
|
50
|
+
```html
|
|
51
|
+
<span>
|
|
52
|
+
0
|
|
53
|
+
1
|
|
54
|
+
</span>
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# [script\_spec.rb:87](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/script_spec.rb#L87)
|
|
60
|
+
## Input
|
|
61
|
+
```haml
|
|
62
|
+
!= '<"&>'
|
|
63
|
+
!= '<"&>'.tap do |str|
|
|
64
|
+
-# no operation
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Output
|
|
69
|
+
### Haml, Faml
|
|
70
|
+
```html
|
|
71
|
+
<"&>
|
|
72
|
+
<"&>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Hamlit
|
|
76
|
+
```html
|
|
77
|
+
<"&>
|
|
78
|
+
<"&>
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# [script\_spec.rb:98](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/script_spec.rb#L98)
|
|
84
|
+
## Input
|
|
85
|
+
```haml
|
|
86
|
+
&= '<"&>'
|
|
87
|
+
&= '<"&>'.tap do |str|
|
|
88
|
+
-# no operation
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Output
|
|
93
|
+
### Haml, Faml
|
|
94
|
+
```html
|
|
95
|
+
<"&>
|
|
96
|
+
<"&>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Hamlit
|
|
100
|
+
```html
|
|
101
|
+
<"&>
|
|
102
|
+
<"&>
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
data/doc/engine/text.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# [text\_spec.rb:15](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/text_spec.rb#L15)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
.
|
|
5
|
+
.*
|
|
6
|
+
#
|
|
7
|
+
#+
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
### Haml
|
|
13
|
+
```html
|
|
14
|
+
Haml::SyntaxError: Illegal element: classes and ids must have values.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Faml
|
|
18
|
+
```html
|
|
19
|
+
<div></div>
|
|
20
|
+
<div>*</div>
|
|
21
|
+
<div></div>
|
|
22
|
+
<div>+</div>
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Hamlit
|
|
27
|
+
```html
|
|
28
|
+
.
|
|
29
|
+
.*
|
|
30
|
+
#
|
|
31
|
+
#+
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# [text\_spec.rb:99](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/text_spec.rb#L99)
|
|
37
|
+
## Input
|
|
38
|
+
```haml
|
|
39
|
+
|
|
40
|
+
\
|
|
41
|
+
!hello
|
|
42
|
+
\!hello
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
### Haml
|
|
48
|
+
```html
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
!hello
|
|
52
|
+
!hello
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Faml, Hamlit
|
|
57
|
+
```html
|
|
58
|
+
nbsp;
|
|
59
|
+
|
|
60
|
+
hello
|
|
61
|
+
!hello
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# [text\_spec.rb:175](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/engine/text_spec.rb#L175)
|
|
67
|
+
## Input
|
|
68
|
+
```haml
|
|
69
|
+
1#{2
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Output
|
|
73
|
+
### Haml
|
|
74
|
+
```html
|
|
75
|
+
Haml::SyntaxError: Unbalanced brackets.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Faml
|
|
79
|
+
```html
|
|
80
|
+
Faml::TextCompiler::InvalidInterpolation: 1#{2
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Hamlit
|
|
84
|
+
```html
|
|
85
|
+
1#{2
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# [coffee\_spec.rb:3](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/coffee_spec.rb#L3)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
:coffee
|
|
5
|
+
foo = ->
|
|
6
|
+
alert('hello')
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Output
|
|
11
|
+
### Haml, Hamlit
|
|
12
|
+
```html
|
|
13
|
+
<script>
|
|
14
|
+
(function() {
|
|
15
|
+
var foo;
|
|
16
|
+
|
|
17
|
+
foo = function() {
|
|
18
|
+
return alert('hello');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
}).call(this);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Faml
|
|
27
|
+
```html
|
|
28
|
+
<script>
|
|
29
|
+
(function() {
|
|
30
|
+
var foo;
|
|
31
|
+
|
|
32
|
+
foo = function() {
|
|
33
|
+
return alert('hello');
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
}).call(this);
|
|
37
|
+
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# [coffee\_spec.rb:22](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/coffee_spec.rb#L22)
|
|
44
|
+
## Input
|
|
45
|
+
```haml
|
|
46
|
+
:coffee
|
|
47
|
+
foo = ->
|
|
48
|
+
alert('hello')
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Output
|
|
53
|
+
### Haml, Hamlit
|
|
54
|
+
```html
|
|
55
|
+
<script>
|
|
56
|
+
(function() {
|
|
57
|
+
var foo;
|
|
58
|
+
|
|
59
|
+
foo = function() {
|
|
60
|
+
return alert('hello');
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
}).call(this);
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Faml
|
|
69
|
+
```html
|
|
70
|
+
<script>
|
|
71
|
+
(function() {
|
|
72
|
+
var foo;
|
|
73
|
+
|
|
74
|
+
foo = function() {
|
|
75
|
+
return alert('hello');
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
}).call(this);
|
|
79
|
+
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# [coffee\_spec.rb:41](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/coffee_spec.rb#L41)
|
|
86
|
+
## Input
|
|
87
|
+
```haml
|
|
88
|
+
:coffee
|
|
89
|
+
foo = ->
|
|
90
|
+
alert("#{'<&>'}")
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Output
|
|
95
|
+
### Haml, Hamlit
|
|
96
|
+
```html
|
|
97
|
+
<script>
|
|
98
|
+
(function() {
|
|
99
|
+
var foo;
|
|
100
|
+
|
|
101
|
+
foo = function() {
|
|
102
|
+
return alert("<&>");
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
}).call(this);
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Faml
|
|
111
|
+
```html
|
|
112
|
+
<script>
|
|
113
|
+
(function() {
|
|
114
|
+
var foo;
|
|
115
|
+
|
|
116
|
+
foo = function() {
|
|
117
|
+
return alert("<&>");
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
}).call(this);
|
|
121
|
+
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
|
data/doc/filters/erb.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# [erb\_spec.rb:3](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/erb_spec.rb#L3)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
:erb
|
|
5
|
+
<% if true %>
|
|
6
|
+
ok
|
|
7
|
+
<% else %>
|
|
8
|
+
ng
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Output
|
|
14
|
+
### Haml
|
|
15
|
+
```html
|
|
16
|
+
ok
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Faml
|
|
22
|
+
```html
|
|
23
|
+
Faml::FilterCompilers::NotFound: Unable to find compiler for erb
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Hamlit
|
|
27
|
+
```html
|
|
28
|
+
ok
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# [javascript\_spec.rb:3](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/javascript_spec.rb#L3)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
before
|
|
5
|
+
:javascript
|
|
6
|
+
after
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Output
|
|
11
|
+
### Haml
|
|
12
|
+
```html
|
|
13
|
+
before
|
|
14
|
+
<script>
|
|
15
|
+
|
|
16
|
+
</script>
|
|
17
|
+
after
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Faml
|
|
22
|
+
```html
|
|
23
|
+
before
|
|
24
|
+
after
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Hamlit
|
|
29
|
+
```html
|
|
30
|
+
before
|
|
31
|
+
<script>
|
|
32
|
+
|
|
33
|
+
</script>
|
|
34
|
+
after
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# [javascript\_spec.rb:32](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/javascript_spec.rb#L32)
|
|
40
|
+
## Input
|
|
41
|
+
```haml
|
|
42
|
+
:javascript
|
|
43
|
+
if {
|
|
44
|
+
alert('hello');
|
|
45
|
+
}
|
|
46
|
+
:javascript
|
|
47
|
+
if {
|
|
48
|
+
alert('hello');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Output
|
|
54
|
+
### Haml
|
|
55
|
+
```html
|
|
56
|
+
<script>
|
|
57
|
+
if {
|
|
58
|
+
alert('hello');
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
<script>
|
|
62
|
+
if {
|
|
63
|
+
alert('hello');
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Faml, Hamlit
|
|
70
|
+
```html
|
|
71
|
+
<script>
|
|
72
|
+
if {
|
|
73
|
+
alert('hello');
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
<script>
|
|
77
|
+
if {
|
|
78
|
+
alert('hello');
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
|
data/doc/filters/less.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# [less\_spec.rb:3](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/less_spec.rb#L3)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
:less
|
|
5
|
+
.users_controller {
|
|
6
|
+
.show_action {
|
|
7
|
+
margin: 10px;
|
|
8
|
+
padding: 20px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Output
|
|
15
|
+
### Haml, Hamlit
|
|
16
|
+
```html
|
|
17
|
+
<style>
|
|
18
|
+
.users_controller .show_action {
|
|
19
|
+
margin: 10px;
|
|
20
|
+
padding: 20px;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Faml
|
|
27
|
+
```html
|
|
28
|
+
Faml::FilterCompilers::NotFound: Unable to find compiler for less
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# [less\_spec.rb:22](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/less_spec.rb#L22)
|
|
33
|
+
## Input
|
|
34
|
+
```haml
|
|
35
|
+
:less
|
|
36
|
+
.foo {
|
|
37
|
+
content: "#{'<&>'}";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Output
|
|
43
|
+
### Haml, Hamlit
|
|
44
|
+
```html
|
|
45
|
+
<style>
|
|
46
|
+
.foo {
|
|
47
|
+
content: "<&>";
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Faml
|
|
54
|
+
```html
|
|
55
|
+
Faml::FilterCompilers::NotFound: Unable to find compiler for less
|
|
56
|
+
```
|
|
57
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# [markdown\_spec.rb:15](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/markdown_spec.rb#L15)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
- project = '<Hamlit>'
|
|
5
|
+
:markdown
|
|
6
|
+
# #{project}
|
|
7
|
+
#{'<&>'}
|
|
8
|
+
Yet another haml implementation
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Output
|
|
13
|
+
### Haml
|
|
14
|
+
```html
|
|
15
|
+
<h1><Hamlit></h1>
|
|
16
|
+
|
|
17
|
+
<p><&>
|
|
18
|
+
Yet another haml implementation</p>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Faml, Hamlit
|
|
24
|
+
```html
|
|
25
|
+
<h1><Hamlit></h1>
|
|
26
|
+
|
|
27
|
+
<p><&>
|
|
28
|
+
Yet another haml implementation</p>
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# [plain\_spec.rb:3](https://github.com/k0kubun/hamlit/blob/master/spec/hamlit/filters/plain_spec.rb#L3)
|
|
2
|
+
## Input
|
|
3
|
+
```haml
|
|
4
|
+
:plain
|
|
5
|
+
あ
|
|
6
|
+
#{'い'}
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Output
|
|
11
|
+
### Haml, Hamlit
|
|
12
|
+
```html
|
|
13
|
+
あ
|
|
14
|
+
い
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Faml
|
|
20
|
+
```html
|
|
21
|
+
あ
|
|
22
|
+
い
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|