oga 2.0.0-java → 2.1-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -4
- data/lib/liboga.jar +0 -0
- data/lib/oga/version.rb +1 -1
- data/lib/oga/xml/entities.rb +15 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e981f6e682ae79eb44c74e805c785d85f32c7cbc
|
4
|
+
data.tar.gz: 1e3188a4106bc96ec7968e393bc44feb7b3502c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78bb3d61fff33c9184521adb690f7c40f8bcbc465077fe2cfc84f36ca5aa70e19ef4a849fa45e18a4b56182da041f9c06620cdf203a898f2b988e72146c70682
|
7
|
+
data.tar.gz: 6c156b860e293fef6819b40af1fa693bb6d9bd3827898fbadc183e9bc216d17c6c2e206dbb978c1c439ff3b8aeb171c0af7b22b822dd162533e02becb5c2e092
|
data/README.md
CHANGED
@@ -18,9 +18,17 @@ From [Wikipedia][oga-wikipedia]:
|
|
18
18
|
|
19
19
|
The name is a pun on [Nokogiri][nokogiri].
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
## Versioning Policy
|
22
|
+
|
23
|
+
Oga uses the version format `MAJOR.MINOR` (e.g. `2.1`). An increase of the MAJOR
|
24
|
+
version indicates backwards incompatible changes were introduced. The MINOR
|
25
|
+
version is _only_ increased when changes are backwards compatible, regardless of
|
26
|
+
whether those changes are bugfixes or new features. Up until version 1.0 the
|
27
|
+
code should be considered unstable meaning it can change (and break) at any
|
28
|
+
given moment.
|
29
|
+
|
30
|
+
APIs explicitly tagged as private (e.g. using Ruby's `private` keyword or YARD's
|
31
|
+
`@api private` tag) are not covered by these rules.
|
24
32
|
|
25
33
|
## Examples
|
26
34
|
|
@@ -318,4 +326,3 @@ found the file "LICENSE" or at <https://www.mozilla.org/MPL/2.0/>.
|
|
318
326
|
[oga-wikipedia]: https://en.wikipedia.org/wiki/Japanese_saw#Other_Japanese_saws
|
319
327
|
[ox]: https://github.com/ohler55/ox
|
320
328
|
[doc-website]: http://code.yorickpeterse.com/oga/latest/
|
321
|
-
[semver]: http://semver.org/spec/v2.0.0.html
|
data/lib/liboga.jar
CHANGED
Binary file
|
data/lib/oga/version.rb
CHANGED
data/lib/oga/xml/entities.rb
CHANGED
@@ -74,14 +74,14 @@ module Oga
|
|
74
74
|
input = input.gsub(REGULAR_ENTITY, mapping)
|
75
75
|
|
76
76
|
if input.include?(AMPERSAND)
|
77
|
-
input = input.gsub(NUMERIC_CODE_POINT_ENTITY) do
|
78
|
-
|
77
|
+
input = input.gsub(NUMERIC_CODE_POINT_ENTITY) do |found|
|
78
|
+
pack_string($1, 10) || found
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
82
|
if input.include?(AMPERSAND)
|
83
|
-
input = input.gsub(HEX_CODE_POINT_ENTITY) do
|
84
|
-
|
83
|
+
input = input.gsub(HEX_CODE_POINT_ENTITY) do |found|
|
84
|
+
pack_string($1, 16) || found
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -104,6 +104,17 @@ module Oga
|
|
104
104
|
def self.encode_attribute(input)
|
105
105
|
input.gsub(ENCODE_ATTRIBUTE_REGEXP, ENCODE_ATTRIBUTE_MAPPING)
|
106
106
|
end
|
107
|
+
|
108
|
+
private
|
109
|
+
|
110
|
+
# @param [String] input
|
111
|
+
# @param [Fixnum] base
|
112
|
+
# @return [String]
|
113
|
+
def self.pack_string(input, base)
|
114
|
+
packed = [Integer(input, base)].pack('U*')
|
115
|
+
|
116
|
+
packed.valid_encoding? ? packed : nil
|
117
|
+
end
|
107
118
|
end # Entities
|
108
119
|
end # XML
|
109
120
|
end # Oga
|
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.
|
4
|
+
version: '2.1'
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Yorick Peterse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|