oga 2.8-java → 2.9-java

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: e203f892b821f3f730bcabcc4929d73ba1605f21
4
- data.tar.gz: 005934da677f8d2f4a51913a7a240d2afc90d1d9
3
+ metadata.gz: 7d27e065ce05a7439b437bc7ea2ab2c52540a091
4
+ data.tar.gz: 6d4b244371d61225e06b34ac178dc6efbbf8ef3c
5
5
  SHA512:
6
- metadata.gz: 07003d655499c8a4e9db7ffd2fa4a7ad7ef491f4ab0fc5696d6e10d586184a363895a55f932b1e7cae02762b31632ae17246742c8d02a5d50a938f22b669d097
7
- data.tar.gz: 9f76f7d9b17d1881a004cfa552cfbfc9057142d90171f50fdb057d0099597664ecfd9ce77de779e50b2bf5fa002d26a98d8d86f606752e2e249c2bbbfa3bfef0
6
+ metadata.gz: d066607fa609522acac93dd6fa4607a83a7bdec373cd6ec60f3d73f4552caeaf08cc9d7419499a32fb018ce905c4bb7af49ff311fd1060459719202da1709b84
7
+ data.tar.gz: 70b58daca99896cf059b88a7487468d976f7681fbac2729410016b841c33d1d59d3b37df2c3c708fb2eb9825770421d1a4adff1e8db95962e46a945c22bc16d0
data/lib/liboga.jar CHANGED
Binary file
data/lib/oga/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oga
2
- VERSION = '2.8'
2
+ VERSION = '2.9'
3
3
  end # Oga
@@ -1,9 +1,7 @@
1
1
  module Oga
2
2
  module XML
3
3
  # Class used for storing information about Doctypes.
4
- class Doctype
5
- include ToXML
6
-
4
+ class Doctype < Node
7
5
  # The name of the doctype (e.g. "HTML").
8
6
  # @return [String]
9
7
  attr_accessor :name
@@ -7,6 +7,11 @@ module Oga
7
7
  include Traversal
8
8
  include ToXML
9
9
 
10
+ # The doctype of the document.
11
+ #
12
+ # When parsing a document this attribute will be set automatically if a
13
+ # doctype resides at the root of the document.
14
+ #
10
15
  # @return [Oga::XML::Doctype]
11
16
  attr_accessor :doctype
12
17
 
@@ -136,7 +136,9 @@ module Oga
136
136
  end
137
137
 
138
138
  if self_closing?(element)
139
- output << "<#{name}#{attrs} />"
139
+ closing_tag = html_void_element?(element) ? '>' : ' />'
140
+
141
+ output << "<#{name}#{attrs}#{closing_tag}"
140
142
  else
141
143
  output << "<#{name}#{attrs}>"
142
144
  end
@@ -214,6 +216,10 @@ module Oga
214
216
  element.children.empty?
215
217
  end
216
218
  end
219
+
220
+ def html_void_element?(element)
221
+ @html_mode && HTML_VOID_ELEMENTS.allow?(element.name)
222
+ end
217
223
  end
218
224
  end
219
225
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oga
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.8'
4
+ version: '2.9'
5
5
  platform: java
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-04 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement