rvpacker-txt 1.8.1 → 1.8.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/read.rb +11 -4
  3. data/rvpacker-txt.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d199295537aa63985fd91781ab16f369f2143e7dc31a60647800896ea554d499
4
- data.tar.gz: 1e9875616671881fad934714622fe57f4a9f9a0c9fa8719e29b33e7e82cb9b94
3
+ metadata.gz: fa47130be6188bd6cc7e662a705d3967640b9c20d359d6f1004cd8f87567c6fa
4
+ data.tar.gz: 73107db4657b4f2790c6b1bbcbec6784c244729218eb9b0a26565a2371b3f985
5
5
  SHA512:
6
- metadata.gz: d5d3dcb0546223e2934632d15e0e3afb1c551ef68179a92a23d607ac2d575119948cd4e0dfff61f44f12b2dc7d0974e5ea9805c90a09a3192ca0a2e253d1e439
7
- data.tar.gz: 971573cb4d854c8b4ca31825c86ed948a8577b73a21ccf30c8f9257c9d2e86eb44a01c2e3b51089941a0c357c94af0bd758c41309f708b2f7cfd5c6850374fd0
6
+ metadata.gz: 1ca284ed2546b82c36113e324c246af68d3f61f7365ee8a37dd6559dba81ef612027160e957935435e20532c36fe184ad4cb791bc389fb8f6a607f84eb489537
7
+ data.tar.gz: 578030edf1a599864badba6f4ae5ba889d721aa5644731a7a462c438023fb5f5795543c7ccafd3468e8140243767523eb0dad8fecbfe5eafc42dae3fbaaa5f87
data/lib/read.rb CHANGED
@@ -26,7 +26,7 @@ def self.extract_quoted_strings(string)
26
26
  stripped = line.strip
27
27
 
28
28
  next if stripped[0] == '#' ||
29
- !stripped.match?(/["']/) ||
29
+ (!in_quotes && !stripped.match?(/["']/)) ||
30
30
  stripped.start_with?(/(Win|Lose)|_Fanfare/) ||
31
31
  stripped.match?(/eval\(/)
32
32
 
@@ -35,8 +35,6 @@ def self.extract_quoted_strings(string)
35
35
 
36
36
  next if skip_block
37
37
 
38
- buffer.push('\#') if in_quotes
39
-
40
38
  line.each_char do |char|
41
39
  if %w[' "].include?(char)
42
40
  unless quote_type.nil? || char == quote_type
@@ -51,7 +49,16 @@ def self.extract_quoted_strings(string)
51
49
  next
52
50
  end
53
51
 
54
- buffer.push(char) if in_quotes
52
+ if in_quotes
53
+ if char == "\r"
54
+ next
55
+ elsif char == "\n"
56
+ buffer.push('\#')
57
+ next
58
+ end
59
+
60
+ buffer.push(char)
61
+ end
55
62
  end
56
63
  end
57
64
 
data/rvpacker-txt.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'rvpacker-txt'
5
- spec.version = '1.8.1'
5
+ spec.version = '1.8.2'
6
6
  spec.authors = ['Howard Jeng', 'Andrew Kesterson', 'Solistra', 'Darkness9724', 'savannstm']
7
7
  spec.email = ['savannstm@gmail.com']
8
8
  spec.summary = 'Reads or writes RPG Maker XP/VX/VXAce game text to .txt files'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvpacker-txt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Howard Jeng