else if (object.string[range->start] == quote_char) {
item_first = range->start++;
- // The very first quote, must be escaped, when quoting is disabled.
+ status = f_fss_skip_past_delimit(state, object, range);
+ if (F_status_is_error(status)) return status;
+
+ // The very first quote, must be escaped, but only when quoting is disabled or first quote is followed by white space.
if (item_first == input_start) {
- status = f_string_dynamic_increase(state.step_large, destination);
- if (F_status_is_error(status)) break;
+ if (quote_is) {
+ status = f_fss_is_space(state, object, *range);
+ if (F_status_is_error(status)) break;
+ }
- destination->string[used_start + 1] = f_fss_delimit_slash_s.string[0];
- }
+ if (!quote_is || quote_is && status == F_true) {
+ status = f_string_dynamic_increase(state.step_large, destination);
+ if (F_status_is_error(status)) break;
- status = f_fss_skip_past_delimit(state, object, range);
- if (F_status_is_error(status)) return status;
+ destination->string[used_start + 1] = f_fss_delimit_slash_s.string[0];
+ }
+ }
if (range->start > range->stop || range->start >= object.used) {
-
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;