TDB2 parsing
- TDB2::load_lines was splitting the text on \n, but because the last line contains \n, there was an additional blank line. This is what split_minimal is for. - split_minimal contained a copy/paste bug that added the extra line if the input was non-trivial, instead of if the remainder was non- trivial. - Fixed incorrect unit test accordingly.
This commit is contained in:
@@ -143,7 +143,7 @@ void split_minimal (
|
||||
start = i + 1;
|
||||
}
|
||||
|
||||
if (input.length ())
|
||||
if (start < input.length ())
|
||||
results.push_back (input.substr (start));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user