mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-19 09:21:30 +03:00
Regex: Fix handling of all unicode codepoint as start chars
This commit is contained in:
parent
df2bf9601c
commit
60e32d73ff
@ -858,6 +858,8 @@ private:
|
||||
else
|
||||
start_chars.map[node->value] = true;
|
||||
}
|
||||
else
|
||||
start_chars.accept_other = true;
|
||||
return node->quantifier.allows_none();
|
||||
case ParsedRegex::AnyChar:
|
||||
for (auto& b : start_chars.map)
|
||||
@ -1332,6 +1334,11 @@ auto test_regex = UnitTest{[]{
|
||||
kak_assert(vm.exec("abcde"));
|
||||
}
|
||||
|
||||
{
|
||||
TestVM<> vm{R"(д)"};
|
||||
kak_assert(vm.exec("д", RegexExecFlags::Search));
|
||||
}
|
||||
|
||||
{
|
||||
TestVM<> vm{R"(\0\x0A\u260e\u260F)"};
|
||||
const char str[] = "\0\n☎☏"; // work around the null byte in the literal
|
||||
|
Loading…
Reference in New Issue
Block a user