google_translate_diff 1.0.4 → 1.0.5

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: 2ed822cbbfdfb7a4881c312f484a8cc33a904449
4
- data.tar.gz: 3133778cb4507b19b4e55a624f2f0c02807bbbf8
3
+ metadata.gz: 0d8fec60fb5c755b82e48191d74c53a99eae96d6
4
+ data.tar.gz: f1adf91843a4ff8379fb253149d5412d991e6f4b
5
5
  SHA512:
6
- metadata.gz: 86f0a5659a72c951ef45395d372d4791b05409f87d97fac03f70486ef2489dfa14ed7d572cf9bca4520f0ce2ae42bac6ae0d4ff1476bcdc45618939ad047e65c
7
- data.tar.gz: c9733103ae4137427f3018a8615557a360a52e98f4bb3236d9ead16d11e8551027792998da5c8094ee6949ca7cf2e4d585d65e57a61ae90fa72f787ece5bcb91
6
+ metadata.gz: 1106eef8897b0dfcf2668836a20e9abe1d167b4a9f44dcd18194b2001640c1987bf808717638968470145d3f3dfb0e951c534fd94b8b98f64a5d94214a2fe960
7
+ data.tar.gz: f5f53c801ab98ce8b8db322c9779d37569b85693ee4337f5358fa6fb35ea3fb9f912beacbd97701ab08651804c330a6740f15dd4ab0d937751709938a17ffc4b
@@ -64,17 +64,14 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
64
64
  class << self
65
65
  def tokenize(value)
66
66
  return [] if value.nil?
67
- tmp = Ox.default_options
68
- Ox.default_options = HTML_OPTIONS
69
67
  tokenizer = new(value).tap do |h|
70
- Ox.sax_parse(h, StringIO.new(value))
68
+ Ox.sax_parse(h, StringIO.new(value), HTML_OPTIONS)
71
69
  h.cut_last_token
72
70
  end
73
- Ox.default_options = tmp
74
71
  tokenizer.tokens
75
72
  end
76
73
  end
77
74
 
78
75
  SKIP = %i[script style].freeze
79
- HTML_OPTIONS = { mode: :generic, effort: :tolerant, smart: true }.freeze
76
+ HTML_OPTIONS = { smart: true, skip: :skip_return }.freeze
80
77
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleTranslateDiff
2
- VERSION = "1.0.4".freeze
2
+ VERSION = "1.0.5".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_translate_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Sokolov