Use unescape rather than a regex in command manager parsing
This commit is contained in:
parent
97df59ddb7
commit
60c1bb1315
|
@ -254,10 +254,10 @@ TokenList parse(StringView line)
|
||||||
++pos;
|
++pos;
|
||||||
if (start_pos != pos)
|
if (start_pos != pos)
|
||||||
{
|
{
|
||||||
String token = line.substr(token_start, pos - token_start);
|
result.emplace_back(
|
||||||
static const Regex regex{R"(\\([ \t;\n]))"};
|
Token::Type::Raw, token_start, pos,
|
||||||
result.emplace_back(Token::Type::Raw, token_start, pos,
|
unescape(line.substr(token_start, pos - token_start),
|
||||||
regex_replace(token, regex, "\\1"));
|
" \t;\n", '\\'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user