ipynbdiff 0.4.2 → 0.4.3

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
  SHA256:
3
- metadata.gz: dd4b3e7e96694361ee62a498007e9bda9165b47b2ef9a31b41322cf8cdd8781f
4
- data.tar.gz: 1680189fc74e0b8e8909d671ce3b77abff51e8ccd0d4304cf088b43a3254a311
3
+ metadata.gz: 4439ffa7f5fb1abc1243c5ab32d1196bb9bb37130c2a1eebe8461a4b0d1bf1bb
4
+ data.tar.gz: 1767b4eccbc36b2644cc2c5c4b50589b0b967dff46e50b4898c328e171adc1f4
5
5
  SHA512:
6
- metadata.gz: fd5cf9cad8f9c20db2051a8b66a998a8174d066ca71e8a45c7bb5e1e274478919ed44fee1a38b296b7a5c679df686da96e402c750d51df0a68db7328260181a7
7
- data.tar.gz: a7ba937ec71caa7a5a5a31cd47ea047f9b2518bd6c7f8a61f120b62deb7d3e6a07dc8ba76e8719b725dab8b6f78cb9b86771273a5a46d9798d744c2bc25d00bf
6
+ metadata.gz: 86fd17c557336d668abfd4677e1883b20d7af02c75afcfe2d4357149953c54520578afd1c7b902591746a3b1ba113778e1794026b57fe44fcf53fc66ace4ddb0
7
+ data.tar.gz: 85b800b3776a519c471be72979a9a0ea186ad4a3251ff4276e2e732c9aed906fd8327ce9797ade66ada6734e248116e1b8338b6b035c607615b0fc21c602a136
@@ -86,19 +86,21 @@ module IpynbDiff
86
86
  end
87
87
 
88
88
  def parse_string
89
- value = ''
90
- prev_char = nil
91
-
92
89
  current_should_be '"'
90
+ init_idx = @char_idx
93
91
 
94
92
  loop do
95
93
  increment_char_index
96
- break if (c = current_char) == '"' && prev_char != '\\'
97
94
 
98
- value += (prev_char = c)
95
+ break if @char_idx > @chars.length
96
+
97
+ if current_char == '"' && prev_char != '\\'
98
+ init_idx += 1
99
+ break
100
+ end
99
101
  end
100
102
 
101
- value
103
+ @chars[init_idx...@char_idx].join
102
104
  end
103
105
 
104
106
  def add_result(key, line_number)
@@ -129,6 +131,10 @@ module IpynbDiff
129
131
  @chars[@char_idx]
130
132
  end
131
133
 
134
+ def prev_char
135
+ @chars[@char_idx - 1]
136
+ end
137
+
132
138
  def current_should_be(another_char)
133
139
  raise InvalidTokenError unless current_char == another_char
134
140
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # lib/emoticon/version.rb
2
2
 
3
3
  module IpynbDiff
4
- VERSION = "0.4.2"
4
+ VERSION = "0.4.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipynbdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Bonet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2022-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy