From 78d40257bd969b58407a251d9746e8fcf0fe4879 Mon Sep 17 00:00:00 2001 From: zlg Date: Tue, 20 Nov 2018 20:47:42 -0800 Subject: system/yaml: Backport emitter fix from v0.2.2-pre1 These patches fix an emitter problem that prevents PyYAML 3.13's test suite from passing. They should not be necessary when libyaml v0.2.2 is released. Patch-Author: James Clarke See-Also: https://github.com/yaml/pyyaml/issues/184 See-Also: https://github.com/yaml/libyaml/issues/60#issuecomment-311836709 --- system/yaml/skip-trailing-doc-term-0.2.1.patch | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 system/yaml/skip-trailing-doc-term-0.2.1.patch (limited to 'system/yaml/skip-trailing-doc-term-0.2.1.patch') diff --git a/system/yaml/skip-trailing-doc-term-0.2.1.patch b/system/yaml/skip-trailing-doc-term-0.2.1.patch new file mode 100644 index 000000000..7e10cd9ea --- /dev/null +++ b/system/yaml/skip-trailing-doc-term-0.2.1.patch @@ -0,0 +1,30 @@ +Contributor Note: As with fix-emitter-0.2.1.patch, this patch should +not be necessary when v0.2.2 is released. + +From 7c2e6f47e1b12ca3dfa9ea2f6c65e9bd8a02e8c8 Mon Sep 17 00:00:00 2001 +From: James Clarke +Date: Thu, 29 Jun 2017 02:24:53 +0100 +Subject: [PATCH 1/2] Revert "This code is not needed and breaks tests" + +This reverts commit 56400d976a1999156b1abfd674c3122843980260. +--- + src/emitter.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/emitter.c b/src/emitter.c +index a5b7ff8..c593a7d 100644 +--- a/src/emitter.c ++++ b/src/emitter.c +@@ -1946,6 +1946,10 @@ yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter, + + emitter->whitespace = 0; + emitter->indention = 0; ++ if (emitter->root_context) ++ { ++ emitter->open_ended = 1; ++ } + + return 1; + } +-- +2.13.2 -- cgit v1.2.3-60-g2f50