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;
|
||||
if (start_pos != pos)
|
||||
{
|
||||
String token = line.substr(token_start, pos - token_start);
|
||||
static const Regex regex{R"(\\([ \t;\n]))"};
|
||||
result.emplace_back(Token::Type::Raw, token_start, pos,
|
||||
regex_replace(token, regex, "\\1"));
|
||||
result.emplace_back(
|
||||
Token::Type::Raw, token_start, pos,
|
||||
unescape(line.substr(token_start, pos - token_start),
|
||||
" \t;\n", '\\'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user