When parsing corpus, anchor header pattern to line start

This commit is contained in:
Max Brunsfeld 2018-03-02 09:46:33 -08:00
parent 82c7e170b3
commit d3ac345644

View file

@ -22,7 +22,7 @@ static string trim_output(const string &input) {
}
static vector<TestEntry> parse_test_entries(string content) {
regex header_pattern("===+\n" "([^=]+)\n" "===+\n", extended);
regex header_pattern("(^|\n)===+\n" "([^=]+)\n" "===+\n", extended);
regex separator_pattern("---+\r?\n", extended);
vector<string> descriptions;
vector<string> bodies;