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: 882bfe578bdc2a3a6787896fa4490e313e9a77d6
4
- data.tar.gz: bf47ea45ceb2d05ec9274922ab9f7da67a39e2d4
3
+ metadata.gz: 1004ac23bcaf6a30b4ad574b19ab82ac4346b911
4
+ data.tar.gz: d1aa40a9f319d1b8b797923405c1951af6e19c44
5
5
  SHA512:
6
- metadata.gz: 61293d2b62d2d806b9ec2225bf5f06eccefbdacb409383bfbf15d9c786dd3dacf311a408fc7890d6e6dc31654f1c751f2cdfc0b9884b1ada9f9d24a9835045b1
7
- data.tar.gz: 8a28a2c4e6b329b4a7271010b2a900b822673b883c8ed6a2b3d5e3218f939f6b7297a4cdbff0e1995bf83e202c825c75d4f8758e449f02981ffef512789b494c
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] = [node[key], EvalExpression.parse(context, attribute.value)].compact.join(' ')
5
+ node[key] = EvalExpression.parse(context, attribute.value)
6
6
  attribute.unlink
7
7
  end
8
- end
8
+ end
@@ -5,8 +5,12 @@ module Thymeleaf
5
5
 
6
6
  class Parser < Struct.new(:template_markup)
7
7
  def call
8
- Nokogiri::HTML::fragment(template_markup, Thymeleaf.configuration.parser.encoding)
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.each do |attribute_key, attribute|
22
- attr_context = process_attribute(attr_context, node, attribute_key, attribute)
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
@@ -1,3 +1,3 @@
1
1
  module Thymeleaf
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2016-09-09 00:00:00.000000000 Z
12
+ date: 2017-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri