if (!data->buffer.used) return;
- if (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e && data->main->parameters.array[fss_embedded_list_read_parameter_original_e].result == f_console_result_none_e) {
const f_string_range_t before = fss_embedded_list_read_print_at_determine_begin(data, object, contents);
if (before.start <= before.stop) {
if (data->buffer.string[before.start] == f_fss_eol_s.string[0]) ++before.start;
}
- if (f_fss_embedded_list_open_s.used && object.stop + 1 < data->buffer.used) {
- after.start = after.stop = object.stop + 1;
+ if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_none_e) {
+ if (f_fss_embedded_list_open_s.used && object.stop + 1 < data->buffer.used) {
+ after.start = after.stop = object.stop + 1;
- if (data->buffer.string[after.stop] == f_fss_embedded_list_open_s.string[0]) {
- after.start = 1;
- after.stop = 0;
- }
- else {
- while (after.stop < data->buffer.used && data->buffer.string[after.stop] != f_fss_embedded_list_open_s.string[0]) ++after.stop;
+ if (data->buffer.string[after.stop] == f_fss_embedded_list_open_s.string[0]) {
+ after.start = 1;
+ after.stop = 0;
+ }
+ else {
+ while (after.stop < data->buffer.used && data->buffer.string[after.stop] != f_fss_embedded_list_open_s.string[0]) ++after.stop;
- if (after.stop == data->buffer.used || data->buffer.string[after.stop] == f_fss_embedded_list_open_s.string[0]) --after.stop;
+ if (after.stop == data->buffer.used || data->buffer.string[after.stop] == f_fss_embedded_list_open_s.string[0]) --after.stop;
+ }
}
}
}
+
+ // Handle case where empty Object is empty because it has spaces and line it up with the close.
+ else if (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
+ const f_string_range_t before = fss_embedded_list_read_print_at_determine_begin(data, object, contents);
+
+ if (before.start <= before.stop) {
+ f_print_except_dynamic_partial(data->buffer, before, objects_delimits, data->main->output.to.stream);
+ }
+ }
}
if (before.start <= before.stop) {