thymeleaf 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1004ac23bcaf6a30b4ad574b19ab82ac4346b911
|
4
|
+
data.tar.gz: d1aa40a9f319d1b8b797923405c1951af6e19c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 805917efc02ef4e868a3080e7458f49ba536c83883c5ce54c3aa8305c74efff85f2eafeeadde1629156671c1093d6e2a4fcc603d4e10d337a2de42fd74fa5bf8
|
7
|
+
data.tar.gz: 9974b159562313625925a79c588846537456022ba9764646414ae9e620f56b709c64f0e5dec63d3360fa16cb88b978536bd403dd3d46b258364cb01d2b700c6b
|
@@ -2,7 +2,7 @@ class DefaultProcessor
|
|
2
2
|
include Thymeleaf::Processor
|
3
3
|
|
4
4
|
def call(key:nil, node:nil, attribute:nil, context:nil)
|
5
|
-
node[key] =
|
5
|
+
node[key] = EvalExpression.parse(context, attribute.value)
|
6
6
|
attribute.unlink
|
7
7
|
end
|
8
|
-
end
|
8
|
+
end
|
data/lib/thymeleaf/parser.rb
CHANGED
@@ -5,8 +5,12 @@ module Thymeleaf
|
|
5
5
|
|
6
6
|
class Parser < Struct.new(:template_markup)
|
7
7
|
def call
|
8
|
-
|
8
|
+
if /^\s*(?:\s*<!--[^>]*-->)*\s*<(?:html|!doctype)/i.match(template_markup)
|
9
|
+
Nokogiri::HTML(template_markup, Thymeleaf.configuration.parser.encoding)
|
10
|
+
else
|
11
|
+
Nokogiri::HTML::fragment(template_markup, Thymeleaf.configuration.parser.encoding)
|
12
|
+
end
|
9
13
|
end
|
10
14
|
end
|
11
15
|
|
12
|
-
end
|
16
|
+
end
|
@@ -18,8 +18,10 @@ module Thymeleaf
|
|
18
18
|
|
19
19
|
def process_attributes(context_holder, node)
|
20
20
|
attr_context = context_holder
|
21
|
-
node.attributes
|
22
|
-
|
21
|
+
if(node.respond_to?(:attributes))
|
22
|
+
node.attributes.each do |attribute_key, attribute|
|
23
|
+
attr_context = process_attribute(attr_context, node, attribute_key, attribute)
|
24
|
+
end
|
23
25
|
end
|
24
26
|
attr_context
|
25
27
|
end
|
@@ -53,4 +55,4 @@ module Thymeleaf
|
|
53
55
|
end
|
54
56
|
end
|
55
57
|
end
|
56
|
-
end
|
58
|
+
end
|
data/lib/thymeleaf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thymeleaf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Barral Precedo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|