xsv 1.0.0.pre → 1.0.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/xsv/sax_parser.rb +19 -3
- data/lib/xsv/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c7de4a72e380ca950dd3f076353c6e275d67314491216708ab2abe28ca1c3b2
|
4
|
+
data.tar.gz: 583a01b780ee1b95f9558d28f8700b885874822c133d5c17b4f3f2e94e0bb6e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a39ec94b6c3b34ce9367e9e4e2790bae830924b60a10938b54cc7c5f40749d2ebef29bfeaa9d7f9587c19c9cafdd6de9335b6aa8a8f9775dbff8632a867177d
|
7
|
+
data.tar.gz: 12967f46a655720dd2262ddaf1acd357d24a846e0160715e8652b116fa991a766250e55cd77ac69e85c315065e1d13458d04684f421524fc3978358c940a5868
|
data/CHANGELOG.md
CHANGED
data/lib/xsv/sax_parser.rb
CHANGED
@@ -30,8 +30,18 @@ module Xsv
|
|
30
30
|
|
31
31
|
if state == :look_start
|
32
32
|
if (o = pbuf.index('<'))
|
33
|
-
chars = pbuf.slice!(0, o + 1).chop
|
34
|
-
|
33
|
+
chars = pbuf.slice!(0, o + 1).chop!.force_encoding('utf-8')
|
34
|
+
|
35
|
+
if respond_to?(:characters) && !chars.empty?
|
36
|
+
if chars.index('&')
|
37
|
+
chars.gsub!('&', %q{&})
|
38
|
+
chars.gsub!(''', %q{'})
|
39
|
+
chars.gsub!('>', %q{>})
|
40
|
+
chars.gsub!('<', %q{<})
|
41
|
+
chars.gsub!('"', %q{"})
|
42
|
+
end
|
43
|
+
characters(chars)
|
44
|
+
end
|
35
45
|
|
36
46
|
state = :look_end
|
37
47
|
elsif eof_reached
|
@@ -46,7 +56,13 @@ module Xsv
|
|
46
56
|
|
47
57
|
if state == :look_end
|
48
58
|
if (o = pbuf.index('>'))
|
49
|
-
|
59
|
+
if (s = pbuf.index(' ')) && s < o
|
60
|
+
tag_name = pbuf.slice!(0, s + 1).chop!
|
61
|
+
args = pbuf.slice!(0, o - s)
|
62
|
+
else
|
63
|
+
tag_name = pbuf.slice!(0, o + 1).chop!
|
64
|
+
args = nil
|
65
|
+
end
|
50
66
|
|
51
67
|
if tag_name.start_with?('/')
|
52
68
|
end_element(tag_name[1..-1]) if respond_to?(:end_element)
|
data/lib/xsv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre
|
4
|
+
version: 1.0.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martijn Storck
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -112,7 +112,7 @@ metadata:
|
|
112
112
|
homepage_uri: https://github.com/martijn/xsv
|
113
113
|
source_code_uri: https://github.com/martijn/xsv
|
114
114
|
changelog_uri: https://github.com/martijn/xsv/CHANGELOG.md
|
115
|
-
post_install_message:
|
115
|
+
post_install_message:
|
116
116
|
rdoc_options: []
|
117
117
|
require_paths:
|
118
118
|
- lib
|
@@ -127,8 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: 1.3.1
|
129
129
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
131
|
-
signing_key:
|
130
|
+
rubygems_version: 3.2.3
|
131
|
+
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: A fast and lightweiggt xlsx parser that provides nothing a CSV parser wouldn't
|
134
134
|
test_files: []
|