Return lost * matching back - fixes #223

pull/238/head
Vitaliy Filippov 2018-08-19 23:58:06 +03:00
parent cbac85a8e5
commit cf51167b55
1 changed files with 2 additions and 0 deletions

View File

@ -335,6 +335,7 @@ bool State::ParseIgnoreFile( const char* buffer, int size )
{
const boost::regex re1( "([^\\\\]|^)[\\t\\r ]+$" );
const boost::regex re2( "^[\\t\\r ]+" );
const boost::regex re4( "([^\\\\](\\\\\\\\)*|^)\\\\\\*" );
const boost::regex re5( "([^\\\\](\\\\\\\\)*|^)\\\\\\?" );
std::string exclude_re, include_re;
std::vector<std::string> lines = split( boost::regex( "[\\n\\r]+" ), buffer, size );
@ -368,6 +369,7 @@ bool State::ParseIgnoreFile( const char* buffer, int size )
while (1)
{
str1 = regex_replace( parts[j], re5, "$1[^/]", boost::format_perl );
str1 = regex_replace( str1, re4, "$1[^/]*", boost::format_perl );
if ( str1.size() == parts[j].size() )
break;
parts[j] = str1;