1 |
commit: 03a29e709b821cb5a216719d1f2171fac0ee2c16 |
2 |
Author: Hanno <hanno <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 7 07:22:34 2019 +0000 |
4 |
Commit: Hanno Boeck <hanno <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 7 07:22:34 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03a29e70 |
7 |
|
8 |
dev-erlang/fast_yaml: Add missing patch |
9 |
|
10 |
Closes: https://bugs.gentoo.org/693342 |
11 |
Signed-off-by: Hanno Boeck <hanno <AT> gentoo.org> |
12 |
Package-Manager: Portage-2.3.75, Repoman-2.3.17 |
13 |
|
14 |
...fast_yaml-1.0.20-dont-escape-simple-quote.patch | 31 ++++++++++++++++++++++ |
15 |
1 file changed, 31 insertions(+) |
16 |
|
17 |
diff --git a/dev-erlang/fast_yaml/files/fast_yaml-1.0.20-dont-escape-simple-quote.patch b/dev-erlang/fast_yaml/files/fast_yaml-1.0.20-dont-escape-simple-quote.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..453374dbf17 |
20 |
--- /dev/null |
21 |
+++ b/dev-erlang/fast_yaml/files/fast_yaml-1.0.20-dont-escape-simple-quote.patch |
22 |
@@ -0,0 +1,31 @@ |
23 |
+From e789f68895f71b7ad31057177810ca0161bf790e Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= <pchmielowski@×××××××××××.net> |
25 |
+Date: Tue, 6 Aug 2019 12:37:28 +0200 |
26 |
+Subject: [PATCH] Don't escape ' inside "", this is not valid yaml |
27 |
+ |
28 |
+This fixes issue #13 |
29 |
+--- |
30 |
+ src/fast_yaml.erl | 3 +-- |
31 |
+ 1 file changed, 1 insertion(+), 2 deletions(-) |
32 |
+ |
33 |
+diff --git a/src/fast_yaml.erl b/src/fast_yaml.erl |
34 |
+index db2be4a..11e453c 100644 |
35 |
+--- a/src/fast_yaml.erl |
36 |
++++ b/src/fast_yaml.erl |
37 |
+@@ -146,7 +146,6 @@ encode(B, _) when is_binary(B) -> |
38 |
+ ($\s) -> [$\s]; % $\s == "space" |
39 |
+ ($\t) -> [$\\, "t"]; % $\t == "tab" |
40 |
+ ($\v) -> [$\\, "v"]; % $\v == "vertical tab" |
41 |
+- ($') -> [$\\, $']; % $" == simple quote |
42 |
+ ($") -> [$\\, $"]; % $" == double quote |
43 |
+ ($\\) -> [$\\, $\\]; % $\\ == backslash |
44 |
+ (C) -> C |
45 |
+@@ -382,7 +381,7 @@ encode_decode_vertical_tab_test() -> |
46 |
+ |
47 |
+ encode_decode_simple_quote_test() -> |
48 |
+ FileName = filename:join(["..", "test", "temp_test.yml"]), |
49 |
+- Binary = <<"\'\"\'">>, |
50 |
++ Binary = <<"'\"'">>, |
51 |
+ Encoded = encode([[{'Source', Binary}]]), |
52 |
+ file:write_file(FileName, Encoded), |
53 |
+ Decoded = decode_from_file(FileName, [plain_as_atom]), |