@@ -8,7 +8,6 @@ |
||
| 8 | 8 | namespace s9e\RegexpBuilder; |
| 9 | 9 | |
| 10 | 10 | use s9e\RegexpBuilder\Input\InputInterface; |
| 11 | -use s9e\RegexpBuilder\Output\OutputInterface; |
|
| 12 | 11 | use s9e\RegexpBuilder\Passes\CoalesceSingleCharacterPrefix; |
| 13 | 12 | use s9e\RegexpBuilder\Passes\GroupSingleCharacters; |
| 14 | 13 | use s9e\RegexpBuilder\Passes\MergePrefix; |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | * @var array Characters to escape outside of a character class |
| 19 | 19 | */ |
| 20 | 20 | public $inLiteral = [ |
| 21 | - '$' => '\\$', '(' => '\\(', ')' => '\\)', '*' => '\\*', |
|
| 22 | - '+' => '\\+', '.' => '\\.', '?' => '\\?', '[' => '\\]', |
|
| 21 | + '$' => '\\$', '(' => '\\(', ')' => '\\)', '*' => '\\*', |
|
| 22 | + '+' => '\\+', '.' => '\\.', '?' => '\\?', '[' => '\\]', |
|
| 23 | 23 | '\\' => '\\\\', '^' => '\\^', '{' => '\\{', '|' => '\\|' |
| 24 | 24 | ]; |
| 25 | 25 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $newStrings = []; |
| 18 | 18 | foreach ($this->getStringsByPrefix($strings) as $prefix => $strings) |
| 19 | 19 | { |
| 20 | - $newStrings[] = (isset($strings[1])) ? $this->mergeStrings($strings) : $strings[0]; |
|
| 20 | + $newStrings[] = (isset($strings[1])) ? $this->mergeStrings($strings) : $strings[0]; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | return $newStrings; |