| @@ 183-195 (lines=13) @@ | ||
| 180 | * |
|
| 181 | * @return false|string |
|
| 182 | */ |
|
| 183 | protected function isOpeningIsolatedDiffTag($item, $currentIsolatedDiffTag = null) |
|
| 184 | { |
|
| 185 | $tagsToMatch = $currentIsolatedDiffTag !== null |
|
| 186 | ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag)) |
|
| 187 | : $this->config->getIsolatedDiffTags(); |
|
| 188 | foreach ($tagsToMatch as $key => $value) { |
|
| 189 | if (preg_match("#<".$key."[^>]*>\\s*#iU", $item)) { |
|
| 190 | return $key; |
|
| 191 | } |
|
| 192 | } |
|
| 193 | ||
| 194 | return false; |
|
| 195 | } |
|
| 196 | ||
| 197 | /** |
|
| 198 | * @param string $item |
|
| @@ 203-215 (lines=13) @@ | ||
| 200 | * |
|
| 201 | * @return false|string |
|
| 202 | */ |
|
| 203 | protected function isClosingIsolatedDiffTag($item, $currentIsolatedDiffTag = null) |
|
| 204 | { |
|
| 205 | $tagsToMatch = $currentIsolatedDiffTag !== null |
|
| 206 | ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag)) |
|
| 207 | : $this->config->getIsolatedDiffTags(); |
|
| 208 | foreach ($tagsToMatch as $key => $value) { |
|
| 209 | if (preg_match("#</".$key."[^>]*>\\s*#iU", $item)) { |
|
| 210 | return $key; |
|
| 211 | } |
|
| 212 | } |
|
| 213 | ||
| 214 | return false; |
|
| 215 | } |
|
| 216 | ||
| 217 | /** |
|
| 218 | * @param Operation $operation |
|