yamlt 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yamlt/parser/line.rb +6 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd31d25d911dc34f0d419e1ef3b54ac36e945725
4
- data.tar.gz: 001ad127c15cca217c76bcee28cbf867b90d21d9
3
+ metadata.gz: 238534d508566b03ef6fa40e871c17ef6b790cd9
4
+ data.tar.gz: 050e0d7336d1436808e42b1f00a390808cb337b0
5
5
  SHA512:
6
- metadata.gz: a12c13da24841eb71bc7219ee7c916294cc026fc306f781370bb68dc931f0f3c5e4cfcb5f96496ed7835acfbc5c6fab51f409ef3ce242b16e92157a13bc6d93f
7
- data.tar.gz: 76df8c63edb8cdde5b86ec863a98bad35ab2853eb80923d2b4cac0cf4d37427b982106dd454f2cfd9d458853847445537436230871f7e827988f4664b23f5c76
6
+ metadata.gz: cebc39e27aaa2a6ccfabafa92c4687f0bfbf8b575242614028f4401f9d3233d56e1aa264452fa144a384e8c8c5ad922524105489b1ea08f5fe118cf2d38acf04
7
+ data.tar.gz: f7fdffb15994dad932586bdf4a163f068912dd3b88f49f45c5e6a8f3fa0fe116fbd094b76c2924096b6ff0ce89c2cfc4a9417726050227b4c9bd1c391c31eadb
@@ -27,6 +27,10 @@ module Yamlt
27
27
 
28
28
  private
29
29
 
30
+ def unescape(value)
31
+ value.gsub(/\\\"/, "\"")
32
+ end
33
+
30
34
  def parse
31
35
  case @text
32
36
  when /^\s*$/
@@ -44,7 +48,7 @@ module Yamlt
44
48
  @fragment = $~[2]
45
49
  @level = $~[1].length / 2
46
50
  @prefix = $~[3]
47
- @value = $~[5]
51
+ @value = unescape($~[5])
48
52
  end
49
53
  when /^(\s*)(\w+):(\s*)\|(\s*)$/
50
54
  if $~[1].length % 2 == 0
@@ -57,7 +61,7 @@ module Yamlt
57
61
  when /^(\s*)([\'\"]?)(.*)\2\s*$/
58
62
  if $~[1].length % 2 == 0
59
63
  @level = $~[1].length / 2
60
- @value = $~[3]
64
+ @value = unescape($~[3])
61
65
  @multiline = true
62
66
  end
63
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamlt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tangerine Cat