|
|
@@ -197,7 +197,7 @@ ucl_emitter_common_end_object (struct ucl_emitter_context *ctx, |
|
|
|
|
|
|
|
if (UCL_EMIT_IDENT_TOP_OBJ(ctx, obj)) { |
|
|
|
ctx->indent --; |
|
|
|
if (compact) { |
|
|
|
if (compact || obj->len == 0) { |
|
|
|
func->ucl_emitter_append_character ('}', 1, func->ud); |
|
|
|
} |
|
|
|
else { |
|
|
@@ -225,7 +225,7 @@ ucl_emitter_common_end_array (struct ucl_emitter_context *ctx, |
|
|
|
const struct ucl_emitter_functions *func = ctx->func; |
|
|
|
|
|
|
|
ctx->indent --; |
|
|
|
if (compact) { |
|
|
|
if (compact || obj->len == 0) { |
|
|
|
func->ucl_emitter_append_character (']', 1, func->ud); |
|
|
|
} |
|
|
|
else { |
|
|
@@ -257,7 +257,7 @@ ucl_emitter_common_start_array (struct ucl_emitter_context *ctx, |
|
|
|
|
|
|
|
ucl_emitter_print_key (print_key, ctx, obj, compact); |
|
|
|
|
|
|
|
if (compact) { |
|
|
|
if (compact || obj->len == 0) { |
|
|
|
func->ucl_emitter_append_character ('[', 1, func->ud); |
|
|
|
} |
|
|
|
else { |
|
|
@@ -282,8 +282,6 @@ ucl_emitter_common_start_array (struct ucl_emitter_context *ctx, |
|
|
|
cur = cur->next; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -307,7 +305,7 @@ ucl_emitter_common_start_object (struct ucl_emitter_context *ctx, |
|
|
|
* <ident_level + 1><object content> |
|
|
|
*/ |
|
|
|
if (UCL_EMIT_IDENT_TOP_OBJ(ctx, obj)) { |
|
|
|
if (compact) { |
|
|
|
if (compact || obj->len == 0) { |
|
|
|
func->ucl_emitter_append_character ('{', 1, func->ud); |
|
|
|
} |
|
|
|
else { |