Implement PCRE2 escaping

Closes #5309.
This commit is contained in:
Mahmoud Al-Qudsi
2018-11-14 23:30:11 -06:00
parent f56c317bd0
commit e160cde606
7 changed files with 107 additions and 3 deletions

View File

@@ -196,6 +196,8 @@ static int handle_flag_1(wchar_t **argv, parser_t &parser, io_streams_t &streams
opts->escape_style = STRING_STYLE_URL;
} else if (wcscmp(w.woptarg, L"var") == 0) {
opts->escape_style = STRING_STYLE_VAR;
} else if (wcscmp(w.woptarg, L"pcre2") == 0) {
opts->escape_style = STRING_STYLE_PCRE2;
} else {
string_error(streams, _(L"%ls: Invalid escape style '%ls'\n"), cmd, w.woptarg);
return STATUS_INVALID_ARGS;