[attr_line] minor perf fix

pull/1006/head
Timothy Stack 2 years ago
parent 64e7b78c6b
commit c0f4254f1c

@ -105,6 +105,12 @@ consume(const string_fragment text)
return word{split_res.first, split_res.second};
}
if (isspace(text.front())) {
auto split_res = text.split_n(1).value();
return space{split_res.first, split_res.second};
}
if (SPACE_RE.match(pc, pi)) {
auto split_res = text.split_n(pc.all()->length()).value();

Loading…
Cancel
Save