yamlt 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yamlt/parser/line.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 238534d508566b03ef6fa40e871c17ef6b790cd9
|
4
|
+
data.tar.gz: 050e0d7336d1436808e42b1f00a390808cb337b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cebc39e27aaa2a6ccfabafa92c4687f0bfbf8b575242614028f4401f9d3233d56e1aa264452fa144a384e8c8c5ad922524105489b1ea08f5fe118cf2d38acf04
|
7
|
+
data.tar.gz: f7fdffb15994dad932586bdf4a163f068912dd3b88f49f45c5e6a8f3fa0fe116fbd094b76c2924096b6ff0ce89c2cfc4a9417726050227b4c9bd1c391c31eadb
|
data/lib/yamlt/parser/line.rb
CHANGED
@@ -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
|