temple 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/lib/temple/html/pretty.rb +4 -5
- data/lib/temple/version.rb +1 -1
- metadata +24 -10
data/CHANGES
CHANGED
data/lib/temple/html/pretty.rb
CHANGED
@@ -8,7 +8,7 @@ module Temple
|
|
8
8
|
fieldset figure footer form head h1 h2 h3 h4 h5 h6
|
9
9
|
header hgroup hr html li link meta nav ol p
|
10
10
|
rp rt ruby section script style table tbody td tfoot
|
11
|
-
th thead title tr ul video).freeze,
|
11
|
+
th thead title tr ul video doctype).freeze,
|
12
12
|
:pre_tags => %w(code pre textarea).freeze
|
13
13
|
|
14
14
|
def initialize(opts = {})
|
@@ -26,7 +26,7 @@ module Temple
|
|
26
26
|
def on_static(content)
|
27
27
|
if @pretty
|
28
28
|
content = content.gsub("\n", indent) if @pre_tags !~ content
|
29
|
-
@last =
|
29
|
+
@last = :noindent
|
30
30
|
end
|
31
31
|
[:static, content]
|
32
32
|
end
|
@@ -50,8 +50,8 @@ module Temple
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def on_html_doctype(type)
|
53
|
-
|
54
|
-
super
|
53
|
+
return super unless @pretty
|
54
|
+
[:multi, [:static, tag_indent('doctype')], super]
|
55
55
|
end
|
56
56
|
|
57
57
|
def on_html_comment(content)
|
@@ -90,7 +90,6 @@ module Temple
|
|
90
90
|
[:code, "#{@pre_tags_name} = /#{@pre_tags.source}/"]
|
91
91
|
end
|
92
92
|
|
93
|
-
# Return indentation if not in pre tag
|
94
93
|
def indent
|
95
94
|
"\n" + (options[:indent] || '') * @indent
|
96
95
|
end
|
data/lib/temple/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: temple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: tilt
|
17
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,15 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
- !ruby/object:Gem::Dependency
|
27
32
|
name: bacon
|
28
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
none: false
|
30
35
|
requirements:
|
31
36
|
- - ! '>='
|
@@ -33,10 +38,15 @@ dependencies:
|
|
33
38
|
version: '0'
|
34
39
|
type: :development
|
35
40
|
prerelease: false
|
36
|
-
version_requirements:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
37
47
|
- !ruby/object:Gem::Dependency
|
38
48
|
name: rake
|
39
|
-
requirement:
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
40
50
|
none: false
|
41
51
|
requirements:
|
42
52
|
- - ! '>='
|
@@ -44,7 +54,12 @@ dependencies:
|
|
44
54
|
version: '0'
|
45
55
|
type: :development
|
46
56
|
prerelease: false
|
47
|
-
version_requirements:
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
48
63
|
description:
|
49
64
|
email:
|
50
65
|
- judofyr@gmail.com
|
@@ -140,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
155
|
version: '0'
|
141
156
|
requirements: []
|
142
157
|
rubyforge_project:
|
143
|
-
rubygems_version: 1.8.
|
158
|
+
rubygems_version: 1.8.24
|
144
159
|
signing_key:
|
145
160
|
specification_version: 3
|
146
161
|
summary: Template compilation framework in Ruby
|
@@ -166,4 +181,3 @@ test_files:
|
|
166
181
|
- test/test_grammar.rb
|
167
182
|
- test/test_hash.rb
|
168
183
|
- test/test_utils.rb
|
169
|
-
has_rdoc:
|