@@ 201-214 (lines=14) @@ | ||
198 | * |
|
199 | * @return false|string |
|
200 | */ |
|
201 | protected function isOpeningIsolatedDiffTag($item, $currentIsolatedDiffTag = null) |
|
202 | { |
|
203 | $tagsToMatch = $currentIsolatedDiffTag !== null |
|
204 | ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag)) |
|
205 | : $this->config->getIsolatedDiffTags(); |
|
206 | $pattern = '#<%s(\s+[^>]*)?>#iU'; |
|
207 | foreach ($tagsToMatch as $key => $value) { |
|
208 | if (preg_match(sprintf($pattern, $key), $item)) { |
|
209 | return $key; |
|
210 | } |
|
211 | } |
|
212 | ||
213 | return false; |
|
214 | } |
|
215 | ||
216 | protected function isSelfClosingTag($text) |
|
217 | { |
|
@@ 227-240 (lines=14) @@ | ||
224 | * |
|
225 | * @return false|string |
|
226 | */ |
|
227 | protected function isClosingIsolatedDiffTag($item, $currentIsolatedDiffTag = null) |
|
228 | { |
|
229 | $tagsToMatch = $currentIsolatedDiffTag !== null |
|
230 | ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag)) |
|
231 | : $this->config->getIsolatedDiffTags(); |
|
232 | $pattern = '#</%s(\s+[^>]*)?>#iU'; |
|
233 | foreach ($tagsToMatch as $key => $value) { |
|
234 | if (preg_match(sprintf($pattern, $key), $item)) { |
|
235 | return $key; |
|
236 | } |
|
237 | } |
|
238 | ||
239 | return false; |
|
240 | } |
|
241 | ||
242 | /** |
|
243 | * @param Operation $operation |