If the content is something like:
example {
}
There is no Content.
This is not being detected correctly an the '}' is being included.
There are two problems here:
1) The current position at the end should be after the eol and not that last newline.
2) If the current position matches the start position, then it needs to be explicitly designated as empty.
// found a valid content close, set stop point to last newline.
if (buffer.string[range->start] == f_fss_eol) {
- range->start = newline_last + 1;
+ ++range->start;
+
+ // If the last newline is the entire start, then there is no Content.
+ if (newline_last == found->array[found->used].start) {
+ found->array[found->used].start = 1;
+ found->array[found->used++].stop = 0;
+
+ return FL_fss_found_content_not;
+ }
+
found->array[found->used++].stop = newline_last;
return FL_fss_found_content;