Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Top level yaml mapping should not finish lines with: ','
Baptiste Daroussin committed 12 years ago
commit 8a62a867d419298242577074e9b3d442b9bdc7f3
parent cc1e04a
1 file changed +6 -1
modified external/libucl/src/ucl_emitter.c
@@ -458,7 +458,12 @@ ucl_elt_obj_write_yaml (ucl_object_t *obj, UT_string *buf, unsigned int tabs, bo
			}
			ucl_elt_write_yaml (cur, buf, is_top ? tabs : tabs + 1, false, false);
			if (cur->type != UCL_OBJECT && cur->type != UCL_ARRAY) {
-
				utstring_append_len (buf, ",\n", 2);
+
				if (!is_top) {
+
					utstring_append_len (buf, ",\n", 2);
+
				}
+
				else {
+
					utstring_append_c (buf, '\n');
+
				}
			}
			else {
				utstring_append_c (buf, '\n');