slim 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGES +12 -0
- data/README.md +20 -4
- data/lib/slim/compiler.rb +117 -7
- data/lib/slim/embedded_engine.rb +1 -0
- data/lib/slim/engine.rb +7 -4
- data/lib/slim/filter.rb +11 -0
- data/lib/slim/grammar.rb +12 -7
- data/lib/slim/interpolation.rb +1 -1
- data/lib/slim/parser.rb +83 -72
- data/lib/slim/sections.rb +4 -0
- data/lib/slim/version.rb +1 -1
- data/slim.gemspec +3 -3
- data/test/slim/helper.rb +1 -1
- data/test/slim/test_code_evaluation.rb +8 -0
- data/test/slim/test_code_output.rb +2 -2
- data/test/slim/test_embedded_engines.rb +2 -4
- data/test/slim/test_html_structure.rb +102 -2
- data/test/slim/test_parser_errors.rb +1 -1
- data/test/slim/test_ruby_errors.rb +8 -1
- metadata +23 -23
- data/extra/slim-mode.el +0 -409
- data/extra/test.slim +0 -49
data/extra/test.slim
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
doctype html
|
2
|
-
html
|
3
|
-
head
|
4
|
-
title Slim Test
|
5
|
-
meta name="keywords" content="slim, syntax"
|
6
|
-
|
7
|
-
javascript:
|
8
|
-
$(function() {
|
9
|
-
alert('Hello World');
|
10
|
-
});
|
11
|
-
|
12
|
-
haml:
|
13
|
-
#someid.someclass{:this => 'test'} Content in haml
|
14
|
-
|
15
|
-
erb:
|
16
|
-
<%= some_method(@request) %>
|
17
|
-
|
18
|
-
body
|
19
|
-
/ comment block
|
20
|
-
with multiple lines
|
21
|
-
This is another line
|
22
|
-
h1 = @page_title
|
23
|
-
p#notice.message
|
24
|
-
| Welcome to the the syntax test.
|
25
|
-
This file is to exercise the various markup.
|
26
|
-
This is another line
|
27
|
-
- unless @users.empty?
|
28
|
-
table
|
29
|
-
- for user in users do
|
30
|
-
tr
|
31
|
-
td.user id=some_ruby('ere', @rme) data-test="some text #{with @ruby}" = @post.name
|
32
|
-
- else
|
33
|
-
p There are no users.
|
34
|
-
|
35
|
-
/ Single comment line
|
36
|
-
#content Hello #{@user.name}! Welcome to the test page!
|
37
|
-
Try out Slim!
|
38
|
-
|
39
|
-
= function_with_many_parameters(:a, @variable, :option => 1)
|
40
|
-
|
41
|
-
p.text
|
42
|
-
' Another text block
|
43
|
-
with multiple lines
|
44
|
-
|
45
|
-
= link_to('Test', @site)
|
46
|
-
|
47
|
-
.text#footer
|
48
|
-
' Footer text block
|
49
|
-
with multiple lines
|