mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Nibbler
- Removed unnecessary addition of capturing parentheses to a regex.
This commit is contained in:
parent
70eba976ae
commit
255af9e110
1 changed files with 1 additions and 7 deletions
|
@ -142,13 +142,7 @@ bool Nibbler::getUntilRx (const std::string& regex, std::string& result)
|
|||
{
|
||||
if (_cursor < _length)
|
||||
{
|
||||
std::string modified_regex;
|
||||
if (regex[0] != '(')
|
||||
modified_regex = "(" + regex + ")";
|
||||
else
|
||||
modified_regex = regex;
|
||||
|
||||
RX r (modified_regex, true);
|
||||
RX r (regex, true);
|
||||
std::vector <int> start;
|
||||
std::vector <int> end;
|
||||
if (r.match (start, end, _input.substr (_cursor)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue