hamlit 1.6.5 → 1.6.6
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/CHANGELOG.md +6 -0
- data/doc/README.md +0 -3
- data/doc/engine/text.md +1 -7
- data/doc/faml/README.md +0 -3
- data/doc/faml/engine/text.md +1 -7
- data/lib/hamlit/compilers/new_attribute.rb +9 -0
- data/lib/hamlit/concerns/balanceable.rb +8 -10
- data/lib/hamlit/parsers/attribute.rb +10 -17
- data/lib/hamlit/version.rb +1 -1
- data/spec/hamlit/engine/new_attribute_spec.rb +16 -0
- data/spec/hamlit/engine/text_spec.rb +1 -1
- data/spec/hamlit/filters/coffee_spec.rb +3 -3
- data/spec/hamlit/filters/sass_spec.rb +2 -2
- data/spec/hamlit/filters/scss_spec.rb +2 -2
- metadata +3 -8
- data/doc/faml/filters/coffee.md +0 -125
- data/doc/faml/filters/sass.md +0 -62
- data/doc/faml/filters/scss.md +0 -68
- data/doc/filters/coffee.md +0 -125
- data/doc/filters/sass.md +0 -62
- data/doc/filters/scss.md +0 -68
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bda4c6ff22c6943b23ebaf8358f66b2f6f01fb66
|
4
|
+
data.tar.gz: 9db2e3e2d27fa2efd0c485cd8441ab07c83478d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb8134311dd9d4cf6aa281abfbf5070093bb887c65a18a37a6c6e152720b1f20a6b88074ea908e8fb6b50ad0fb3c512745d9d54b01ff48246c9312518a37738a
|
7
|
+
data.tar.gz: 4a42cdc7aac2be14ca3f575dec01d7a29add11edff720b0f8a74e94d0227bda47efd4d71b6e79d0fa278cfe99085f6d5b743b1fe011da52c985c6a7e109020b1
|
data/CHANGELOG.md
CHANGED
data/doc/README.md
CHANGED
@@ -12,11 +12,8 @@ Showing incompatibilities against [Haml](https://github.com/haml/haml) and [Faml
|
|
12
12
|
|
13
13
|
|
14
14
|
## filters
|
15
|
-
- [filters/coffee\_spec.rb](filters/coffee.md)
|
16
15
|
- [filters/erb\_spec.rb](filters/erb.md)
|
17
16
|
- [filters/javascript\_spec.rb](filters/javascript.md)
|
18
17
|
- [filters/less\_spec.rb](filters/less.md)
|
19
18
|
- [filters/markdown\_spec.rb](filters/markdown.md)
|
20
19
|
- [filters/plain\_spec.rb](filters/plain.md)
|
21
|
-
- [filters/sass\_spec.rb](filters/sass.md)
|
22
|
-
- [filters/scss\_spec.rb](filters/scss.md)
|
data/doc/engine/text.md
CHANGED
@@ -18,13 +18,7 @@ Haml::SyntaxError: Illegal element: classes and ids must have values.
|
|
18
18
|
|
19
19
|
### Faml
|
20
20
|
```html
|
21
|
-
|
22
|
-
<div>*</div>
|
23
|
-
<div></div>
|
24
|
-
<div></div>
|
25
|
-
<div>+</div>
|
26
|
-
<div></div>
|
27
|
-
|
21
|
+
Faml::SyntaxError: Illegal element: classes and ids must have values.
|
28
22
|
```
|
29
23
|
|
30
24
|
### Hamlit
|
data/doc/faml/README.md
CHANGED
@@ -10,10 +10,7 @@ Showing incompatibilities against [Faml](https://github.com/eagletmt/faml).
|
|
10
10
|
|
11
11
|
|
12
12
|
## filters
|
13
|
-
- [filters/coffee\_spec.rb](filters/coffee.md)
|
14
13
|
- [filters/erb\_spec.rb](filters/erb.md)
|
15
14
|
- [filters/javascript\_spec.rb](filters/javascript.md)
|
16
15
|
- [filters/less\_spec.rb](filters/less.md)
|
17
16
|
- [filters/plain\_spec.rb](filters/plain.md)
|
18
|
-
- [filters/sass\_spec.rb](filters/sass.md)
|
19
|
-
- [filters/scss\_spec.rb](filters/scss.md)
|
data/doc/faml/engine/text.md
CHANGED
@@ -44,6 +44,15 @@ module Hamlit
|
|
44
44
|
def read_key!(tokens)
|
45
45
|
skip_tokens!(tokens, :on_sp, :on_nl, :on_ignored_nl)
|
46
46
|
(row, col), type, key = tokens.shift
|
47
|
+
|
48
|
+
while tokens.any? && tokens.first[2] == '-'
|
49
|
+
tokens.shift
|
50
|
+
|
51
|
+
(row, col), type, part = tokens.shift
|
52
|
+
|
53
|
+
key = "#{key}-#{part}"
|
54
|
+
end
|
55
|
+
|
47
56
|
key
|
48
57
|
end
|
49
58
|
|
@@ -11,9 +11,8 @@ module Hamlit
|
|
11
11
|
fetch_balanced_tokens(all_tokens, :on_lparen, :on_rparen)
|
12
12
|
end
|
13
13
|
|
14
|
-
def fetch_balanced_embexprs(all_tokens)
|
15
|
-
|
16
|
-
fetch_balanced_tokens(tokens, :on_embexpr_beg, :on_embexpr_end)
|
14
|
+
def fetch_balanced_embexprs(all_tokens, start_count: 0)
|
15
|
+
fetch_balanced_tokens(all_tokens, :on_embexpr_beg, :on_embexpr_end, start_count: start_count)
|
17
16
|
end
|
18
17
|
|
19
18
|
def balanced_braces_exist?(tokens)
|
@@ -24,16 +23,15 @@ module Hamlit
|
|
24
23
|
balanced_tokens_exist?(tokens, :on_lparen, :on_rparen)
|
25
24
|
end
|
26
25
|
|
27
|
-
def balanced_embexprs_exist?(tokens)
|
28
|
-
tokens
|
29
|
-
balanced_tokens_exist?(tokens, :on_embexpr_beg, :on_embexpr_end)
|
26
|
+
def balanced_embexprs_exist?(tokens, start_count: 0)
|
27
|
+
balanced_tokens_exist?(tokens, :on_embexpr_beg, :on_embexpr_end, start_count: start_count)
|
30
28
|
end
|
31
29
|
|
32
30
|
private
|
33
31
|
|
34
|
-
def fetch_balanced_tokens(all_tokens, open_token, close_token)
|
32
|
+
def fetch_balanced_tokens(all_tokens, open_token, close_token, start_count: 0)
|
35
33
|
tokens = []
|
36
|
-
open_count =
|
34
|
+
open_count = start_count
|
37
35
|
|
38
36
|
all_tokens.each_with_index do |token, index|
|
39
37
|
(row, col), type, str = token
|
@@ -49,8 +47,8 @@ module Hamlit
|
|
49
47
|
tokens
|
50
48
|
end
|
51
49
|
|
52
|
-
def balanced_tokens_exist?(tokens, open_token, close_token)
|
53
|
-
open_count =
|
50
|
+
def balanced_tokens_exist?(tokens, open_token, close_token, start_count: 0)
|
51
|
+
open_count = start_count
|
54
52
|
|
55
53
|
tokens.each do |token|
|
56
54
|
(row, col), type, str = token
|
@@ -8,7 +8,9 @@ module Hamlit
|
|
8
8
|
include Concerns::Balanceable
|
9
9
|
include Concerns::Lexable
|
10
10
|
|
11
|
-
|
11
|
+
ATTRIBUTE_BEGIN = '{'.freeze
|
12
|
+
METHOD_CALL_PREFIX = 'a('.freeze
|
13
|
+
BALANCE_START_COUNT = 1
|
12
14
|
|
13
15
|
def parse_attributes(scanner)
|
14
16
|
if scanner.match?(/{/)
|
@@ -22,22 +24,22 @@ module Hamlit
|
|
22
24
|
|
23
25
|
# NOTE: Old attributes are not valid as Ruby expression.
|
24
26
|
# So Ripper is broken if you give an original expression to it.
|
25
|
-
# This method bypasses it by changing expression to
|
27
|
+
# This method bypasses it by changing expression to method call.
|
26
28
|
# Ideally you should implement an original lexer for haml old attributes.
|
27
29
|
def parse_old_attributes(scanner)
|
28
30
|
return [] unless scanner.match?(/{/)
|
29
31
|
|
30
|
-
tokens =
|
31
|
-
until balanced_embexprs_exist?(tokens)
|
32
|
+
tokens = Ripper.lex(scanner.rest.sub(ATTRIBUTE_BEGIN, METHOD_CALL_PREFIX))
|
33
|
+
until balanced_embexprs_exist?(tokens, start_count: BALANCE_START_COUNT)
|
32
34
|
@current_lineno += 1
|
33
35
|
break unless @lines[@current_lineno]
|
34
36
|
scanner.concat(current_line)
|
35
|
-
tokens =
|
37
|
+
tokens = Ripper.lex(scanner.rest.sub(ATTRIBUTE_BEGIN, METHOD_CALL_PREFIX))
|
36
38
|
end
|
37
39
|
|
38
|
-
tokens = fetch_balanced_embexprs(tokens)
|
39
|
-
scanner.pos += tokens.last.first.last
|
40
|
-
[tokens.map(&:last).join.
|
40
|
+
tokens = fetch_balanced_embexprs(tokens, start_count: BALANCE_START_COUNT)
|
41
|
+
scanner.pos += tokens.last.first.last
|
42
|
+
[tokens.map(&:last).join.sub(METHOD_CALL_PREFIX, ATTRIBUTE_BEGIN)]
|
41
43
|
end
|
42
44
|
|
43
45
|
def parse_new_attributes(scanner)
|
@@ -56,15 +58,6 @@ module Hamlit
|
|
56
58
|
scanner.pos += convert_position(text, *tokens.last.first) + 1
|
57
59
|
[text]
|
58
60
|
end
|
59
|
-
|
60
|
-
# Ripper.lex and reject tokens whose row is 0 (invalid).
|
61
|
-
# This should be used only for an expression which can
|
62
|
-
# be invalid as Ruby and valid as haml.
|
63
|
-
def try_lex(str)
|
64
|
-
Ripper.lex(str).reject do |(row, col), type, str|
|
65
|
-
row == 0
|
66
|
-
end
|
67
|
-
end
|
68
61
|
end
|
69
62
|
end
|
70
63
|
end
|
data/lib/hamlit/version.rb
CHANGED
@@ -27,6 +27,22 @@ describe Hamlit::Engine do
|
|
27
27
|
HTML
|
28
28
|
end
|
29
29
|
|
30
|
+
it 'renders hyphenated attributes properly' do
|
31
|
+
assert_render(<<-HAML, <<-HTML)
|
32
|
+
%p(data-foo='bar') bar
|
33
|
+
HAML
|
34
|
+
<p data-foo='bar'>bar</p>
|
35
|
+
HTML
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'renders multiply hyphenated attributes properly' do
|
39
|
+
assert_render(<<-HAML, <<-HTML)
|
40
|
+
%p(data-x-foo='bar') bar
|
41
|
+
HAML
|
42
|
+
<p data-x-foo='bar'>bar</p>
|
43
|
+
HTML
|
44
|
+
end
|
45
|
+
|
30
46
|
describe 'html escape' do
|
31
47
|
it 'escapes attribute values on static attributes' do
|
32
48
|
assert_render(<<-'HAML', <<-HTML, compatible_only: :faml)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
describe Hamlit::Filters::Coffee do
|
2
2
|
describe '#compile' do
|
3
3
|
it 'renders coffee filter' do
|
4
|
-
assert_render(<<-HAML, <<-HTML
|
4
|
+
assert_render(<<-HAML, <<-HTML)
|
5
5
|
:coffee
|
6
6
|
foo = ->
|
7
7
|
alert('hello')
|
@@ -20,7 +20,7 @@ describe Hamlit::Filters::Coffee do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'renders coffeescript filter' do
|
23
|
-
assert_render(<<-HAML, <<-HTML
|
23
|
+
assert_render(<<-HAML, <<-HTML)
|
24
24
|
:coffee
|
25
25
|
foo = ->
|
26
26
|
alert('hello')
|
@@ -39,7 +39,7 @@ describe Hamlit::Filters::Coffee do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'renders coffeescript filter' do
|
42
|
-
assert_render(<<-'HAML', <<-HTML
|
42
|
+
assert_render(<<-'HAML', <<-HTML)
|
43
43
|
:coffee
|
44
44
|
foo = ->
|
45
45
|
alert("#{'<&>'}")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
describe Hamlit::Filters::Sass do
|
2
2
|
describe '#compile' do
|
3
3
|
it 'renders sass filter' do
|
4
|
-
assert_render(<<-HAML, <<-HTML
|
4
|
+
assert_render(<<-HAML, <<-HTML)
|
5
5
|
:sass
|
6
6
|
.users_controller
|
7
7
|
.show_action
|
@@ -17,7 +17,7 @@ describe Hamlit::Filters::Sass do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'renders sass filter with string interpolation' do
|
20
|
-
assert_render(<<-'HAML', <<-HTML
|
20
|
+
assert_render(<<-'HAML', <<-HTML)
|
21
21
|
:sass
|
22
22
|
.users_controller
|
23
23
|
.show_action
|
@@ -1,7 +1,7 @@
|
|
1
1
|
describe Hamlit::Filters::Scss do
|
2
2
|
describe '#compile' do
|
3
3
|
it 'renders scss filter' do
|
4
|
-
assert_render(<<-HAML, <<-HTML
|
4
|
+
assert_render(<<-HAML, <<-HTML)
|
5
5
|
:scss
|
6
6
|
.users_controller {
|
7
7
|
.show_action {
|
@@ -19,7 +19,7 @@ describe Hamlit::Filters::Scss do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'parses string interpolation' do
|
22
|
-
assert_render(<<-'HAML', <<-HTML
|
22
|
+
assert_render(<<-'HAML', <<-HTML)
|
23
23
|
:scss
|
24
24
|
.users_controller {
|
25
25
|
.show_action {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hamlit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|
@@ -311,21 +311,15 @@ files:
|
|
311
311
|
- doc/faml/engine/old_attributes.md
|
312
312
|
- doc/faml/engine/silent_script.md
|
313
313
|
- doc/faml/engine/text.md
|
314
|
-
- doc/faml/filters/coffee.md
|
315
314
|
- doc/faml/filters/erb.md
|
316
315
|
- doc/faml/filters/javascript.md
|
317
316
|
- doc/faml/filters/less.md
|
318
317
|
- doc/faml/filters/plain.md
|
319
|
-
- doc/faml/filters/sass.md
|
320
|
-
- doc/faml/filters/scss.md
|
321
|
-
- doc/filters/coffee.md
|
322
318
|
- doc/filters/erb.md
|
323
319
|
- doc/filters/javascript.md
|
324
320
|
- doc/filters/less.md
|
325
321
|
- doc/filters/markdown.md
|
326
322
|
- doc/filters/plain.md
|
327
|
-
- doc/filters/sass.md
|
328
|
-
- doc/filters/scss.md
|
329
323
|
- doc/haml/README.md
|
330
324
|
- doc/haml/engine/new_attribute.md
|
331
325
|
- doc/haml/engine/old_attributes.md
|
@@ -604,3 +598,4 @@ test_files:
|
|
604
598
|
- spec/spec_helper/document_generator.rb
|
605
599
|
- spec/spec_helper/render_helper.rb
|
606
600
|
- spec/spec_helper/test_case.rb
|
601
|
+
has_rdoc:
|
data/doc/faml/filters/coffee.md
DELETED
@@ -1,125 +0,0 @@
|
|
1
|
-
# [coffee\_spec.rb:3](/spec/hamlit/filters/coffee_spec.rb#L3)
|
2
|
-
## Input
|
3
|
-
```haml
|
4
|
-
:coffee
|
5
|
-
foo = ->
|
6
|
-
alert('hello')
|
7
|
-
|
8
|
-
```
|
9
|
-
|
10
|
-
## Output
|
11
|
-
### Faml
|
12
|
-
```html
|
13
|
-
<script>
|
14
|
-
(function() {
|
15
|
-
var foo;
|
16
|
-
|
17
|
-
foo = function() {
|
18
|
-
return alert('hello');
|
19
|
-
};
|
20
|
-
|
21
|
-
}).call(this);
|
22
|
-
|
23
|
-
</script>
|
24
|
-
|
25
|
-
```
|
26
|
-
|
27
|
-
### Hamlit
|
28
|
-
```html
|
29
|
-
<script>
|
30
|
-
(function() {
|
31
|
-
var foo;
|
32
|
-
|
33
|
-
foo = function() {
|
34
|
-
return alert('hello');
|
35
|
-
};
|
36
|
-
|
37
|
-
}).call(this);
|
38
|
-
</script>
|
39
|
-
|
40
|
-
```
|
41
|
-
|
42
|
-
|
43
|
-
# [coffee\_spec.rb:22](/spec/hamlit/filters/coffee_spec.rb#L22)
|
44
|
-
## Input
|
45
|
-
```haml
|
46
|
-
:coffee
|
47
|
-
foo = ->
|
48
|
-
alert('hello')
|
49
|
-
|
50
|
-
```
|
51
|
-
|
52
|
-
## Output
|
53
|
-
### Faml
|
54
|
-
```html
|
55
|
-
<script>
|
56
|
-
(function() {
|
57
|
-
var foo;
|
58
|
-
|
59
|
-
foo = function() {
|
60
|
-
return alert('hello');
|
61
|
-
};
|
62
|
-
|
63
|
-
}).call(this);
|
64
|
-
|
65
|
-
</script>
|
66
|
-
|
67
|
-
```
|
68
|
-
|
69
|
-
### Hamlit
|
70
|
-
```html
|
71
|
-
<script>
|
72
|
-
(function() {
|
73
|
-
var foo;
|
74
|
-
|
75
|
-
foo = function() {
|
76
|
-
return alert('hello');
|
77
|
-
};
|
78
|
-
|
79
|
-
}).call(this);
|
80
|
-
</script>
|
81
|
-
|
82
|
-
```
|
83
|
-
|
84
|
-
|
85
|
-
# [coffee\_spec.rb:41](/spec/hamlit/filters/coffee_spec.rb#L41)
|
86
|
-
## Input
|
87
|
-
```haml
|
88
|
-
:coffee
|
89
|
-
foo = ->
|
90
|
-
alert("#{'<&>'}")
|
91
|
-
|
92
|
-
```
|
93
|
-
|
94
|
-
## Output
|
95
|
-
### Faml
|
96
|
-
```html
|
97
|
-
<script>
|
98
|
-
(function() {
|
99
|
-
var foo;
|
100
|
-
|
101
|
-
foo = function() {
|
102
|
-
return alert("<&>");
|
103
|
-
};
|
104
|
-
|
105
|
-
}).call(this);
|
106
|
-
|
107
|
-
</script>
|
108
|
-
|
109
|
-
```
|
110
|
-
|
111
|
-
### Hamlit
|
112
|
-
```html
|
113
|
-
<script>
|
114
|
-
(function() {
|
115
|
-
var foo;
|
116
|
-
|
117
|
-
foo = function() {
|
118
|
-
return alert("<&>");
|
119
|
-
};
|
120
|
-
|
121
|
-
}).call(this);
|
122
|
-
</script>
|
123
|
-
|
124
|
-
```
|
125
|
-
|
data/doc/faml/filters/sass.md
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
# [sass\_spec.rb:3](/spec/hamlit/filters/sass_spec.rb#L3)
|
2
|
-
## Input
|
3
|
-
```haml
|
4
|
-
:sass
|
5
|
-
.users_controller
|
6
|
-
.show_action
|
7
|
-
margin: 10px
|
8
|
-
padding: 20px
|
9
|
-
|
10
|
-
```
|
11
|
-
|
12
|
-
## Output
|
13
|
-
### Faml
|
14
|
-
```html
|
15
|
-
<style>
|
16
|
-
.users_controller .show_action {
|
17
|
-
margin: 10px;
|
18
|
-
padding: 20px; }
|
19
|
-
</style>
|
20
|
-
|
21
|
-
```
|
22
|
-
|
23
|
-
### Hamlit
|
24
|
-
```html
|
25
|
-
<style>
|
26
|
-
.users_controller .show_action {
|
27
|
-
margin: 10px;
|
28
|
-
padding: 20px; }
|
29
|
-
</style>
|
30
|
-
|
31
|
-
```
|
32
|
-
|
33
|
-
|
34
|
-
# [sass\_spec.rb:19](/spec/hamlit/filters/sass_spec.rb#L19)
|
35
|
-
## Input
|
36
|
-
```haml
|
37
|
-
:sass
|
38
|
-
.users_controller
|
39
|
-
.show_action
|
40
|
-
content: "#{'<&>'}"
|
41
|
-
|
42
|
-
```
|
43
|
-
|
44
|
-
## Output
|
45
|
-
### Faml
|
46
|
-
```html
|
47
|
-
<style>
|
48
|
-
.users_controller .show_action {
|
49
|
-
content: "<&>"; }
|
50
|
-
</style>
|
51
|
-
|
52
|
-
```
|
53
|
-
|
54
|
-
### Hamlit
|
55
|
-
```html
|
56
|
-
<style>
|
57
|
-
.users_controller .show_action {
|
58
|
-
content: "<&>"; }
|
59
|
-
</style>
|
60
|
-
|
61
|
-
```
|
62
|
-
|
data/doc/faml/filters/scss.md
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# [scss\_spec.rb:3](/spec/hamlit/filters/scss_spec.rb#L3)
|
2
|
-
## Input
|
3
|
-
```haml
|
4
|
-
:scss
|
5
|
-
.users_controller {
|
6
|
-
.show_action {
|
7
|
-
margin: 10px;
|
8
|
-
padding: 20px;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
```
|
13
|
-
|
14
|
-
## Output
|
15
|
-
### Faml
|
16
|
-
```html
|
17
|
-
<style>
|
18
|
-
.users_controller .show_action {
|
19
|
-
margin: 10px;
|
20
|
-
padding: 20px; }
|
21
|
-
|
22
|
-
</style>
|
23
|
-
|
24
|
-
```
|
25
|
-
|
26
|
-
### Hamlit
|
27
|
-
```html
|
28
|
-
<style>
|
29
|
-
.users_controller .show_action {
|
30
|
-
margin: 10px;
|
31
|
-
padding: 20px; }
|
32
|
-
</style>
|
33
|
-
|
34
|
-
```
|
35
|
-
|
36
|
-
|
37
|
-
# [scss\_spec.rb:21](/spec/hamlit/filters/scss_spec.rb#L21)
|
38
|
-
## Input
|
39
|
-
```haml
|
40
|
-
:scss
|
41
|
-
.users_controller {
|
42
|
-
.show_action {
|
43
|
-
content: "#{'<&>'}";
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
```
|
48
|
-
|
49
|
-
## Output
|
50
|
-
### Faml
|
51
|
-
```html
|
52
|
-
<style>
|
53
|
-
.users_controller .show_action {
|
54
|
-
content: "<&>"; }
|
55
|
-
|
56
|
-
</style>
|
57
|
-
|
58
|
-
```
|
59
|
-
|
60
|
-
### Hamlit
|
61
|
-
```html
|
62
|
-
<style>
|
63
|
-
.users_controller .show_action {
|
64
|
-
content: "<&>"; }
|
65
|
-
</style>
|
66
|
-
|
67
|
-
```
|
68
|
-
|
data/doc/filters/coffee.md
DELETED
@@ -1,125 +0,0 @@
|
|
1
|
-
# [coffee\_spec.rb:3](/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](/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](/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/sass.md
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
# [sass\_spec.rb:3](/spec/hamlit/filters/sass_spec.rb#L3)
|
2
|
-
## Input
|
3
|
-
```haml
|
4
|
-
:sass
|
5
|
-
.users_controller
|
6
|
-
.show_action
|
7
|
-
margin: 10px
|
8
|
-
padding: 20px
|
9
|
-
|
10
|
-
```
|
11
|
-
|
12
|
-
## Output
|
13
|
-
### Haml, Hamlit
|
14
|
-
```html
|
15
|
-
<style>
|
16
|
-
.users_controller .show_action {
|
17
|
-
margin: 10px;
|
18
|
-
padding: 20px; }
|
19
|
-
</style>
|
20
|
-
|
21
|
-
```
|
22
|
-
|
23
|
-
### Faml
|
24
|
-
```html
|
25
|
-
<style>
|
26
|
-
.users_controller .show_action {
|
27
|
-
margin: 10px;
|
28
|
-
padding: 20px; }
|
29
|
-
</style>
|
30
|
-
|
31
|
-
```
|
32
|
-
|
33
|
-
|
34
|
-
# [sass\_spec.rb:19](/spec/hamlit/filters/sass_spec.rb#L19)
|
35
|
-
## Input
|
36
|
-
```haml
|
37
|
-
:sass
|
38
|
-
.users_controller
|
39
|
-
.show_action
|
40
|
-
content: "#{'<&>'}"
|
41
|
-
|
42
|
-
```
|
43
|
-
|
44
|
-
## Output
|
45
|
-
### Haml, Hamlit
|
46
|
-
```html
|
47
|
-
<style>
|
48
|
-
.users_controller .show_action {
|
49
|
-
content: "<&>"; }
|
50
|
-
</style>
|
51
|
-
|
52
|
-
```
|
53
|
-
|
54
|
-
### Faml
|
55
|
-
```html
|
56
|
-
<style>
|
57
|
-
.users_controller .show_action {
|
58
|
-
content: "<&>"; }
|
59
|
-
</style>
|
60
|
-
|
61
|
-
```
|
62
|
-
|
data/doc/filters/scss.md
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# [scss\_spec.rb:3](/spec/hamlit/filters/scss_spec.rb#L3)
|
2
|
-
## Input
|
3
|
-
```haml
|
4
|
-
:scss
|
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
|
-
</style>
|
22
|
-
|
23
|
-
```
|
24
|
-
|
25
|
-
### Faml
|
26
|
-
```html
|
27
|
-
<style>
|
28
|
-
.users_controller .show_action {
|
29
|
-
margin: 10px;
|
30
|
-
padding: 20px; }
|
31
|
-
|
32
|
-
</style>
|
33
|
-
|
34
|
-
```
|
35
|
-
|
36
|
-
|
37
|
-
# [scss\_spec.rb:21](/spec/hamlit/filters/scss_spec.rb#L21)
|
38
|
-
## Input
|
39
|
-
```haml
|
40
|
-
:scss
|
41
|
-
.users_controller {
|
42
|
-
.show_action {
|
43
|
-
content: "#{'<&>'}";
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
```
|
48
|
-
|
49
|
-
## Output
|
50
|
-
### Haml, Hamlit
|
51
|
-
```html
|
52
|
-
<style>
|
53
|
-
.users_controller .show_action {
|
54
|
-
content: "<&>"; }
|
55
|
-
</style>
|
56
|
-
|
57
|
-
```
|
58
|
-
|
59
|
-
### Faml
|
60
|
-
```html
|
61
|
-
<style>
|
62
|
-
.users_controller .show_action {
|
63
|
-
content: "<&>"; }
|
64
|
-
|
65
|
-
</style>
|
66
|
-
|
67
|
-
```
|
68
|
-
|