@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | \s+ # Match minimal 1 whitespace between the elements |
| 64 | 64 | <('.$elementsRegex.') # Match the start of the next inline element |
| 65 | 65 | /xi', |
| 66 | - function ($match) use ($placeholderContainer) { |
|
| 66 | + function($match) use ($placeholderContainer) { |
|
| 67 | 67 | // Where going to respect one space between the inline elements. |
| 68 | 68 | $placeholder = $placeholderContainer->addPlaceholder(' '); |
| 69 | 69 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | ) |
| 94 | 94 | <('.$elementsRegex.') # Match starting tag |
| 95 | 95 | /xis', |
| 96 | - function ($match) use ($placeholderContainer) { |
|
| 96 | + function($match) use ($placeholderContainer) { |
|
| 97 | 97 | return $this->replaceWhitespacesInInlineElements($match[1], $placeholderContainer).'<'.$match[3]; |
| 98 | 98 | }, $contents); |
| 99 | 99 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | private function replaceWhitespacesInInlineElements($element, PlaceholderContainer $placeholderContainer) |
| 110 | 110 | { |
| 111 | - return preg_replace_callback('/>\s/', function ($match) use ($placeholderContainer) { |
|
| 111 | + return preg_replace_callback('/>\s/', function($match) use ($placeholderContainer) { |
|
| 112 | 112 | return '>'.$placeholderContainer->addPlaceholder(' '); |
| 113 | 113 | }, $element); |
| 114 | 114 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $pattern = '/ |
| 127 | 127 | ( |
| 128 | - <(' . $htmlTags . ') # Match html start tag and capture |
|
| 128 | + <(' . $htmlTags.') # Match html start tag and capture |
|
| 129 | 129 | (?: |
| 130 | 130 | [^"\'>]*|"[^"]*"|\'[^\']*\' |
| 131 | 131 | )* # Match all attributes |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | (<\/\2>) # Match end tag by back referencing the start tag |
| 141 | 141 | /xis'; |
| 142 | 142 | |
| 143 | - $contents = preg_replace_callback($pattern, function ($match) use ($placeholderContainer) { |
|
| 144 | - return $match[1] . $placeholderContainer->addPlaceholder($match[3]) . $match[4]; |
|
| 143 | + $contents = preg_replace_callback($pattern, function($match) use ($placeholderContainer) { |
|
| 144 | + return $match[1].$placeholderContainer->addPlaceholder($match[3]).$match[4]; |
|
| 145 | 145 | }, $contents); |
| 146 | 146 | |
| 147 | 147 | return $contents; |