| @@ 173-183 (lines=11) @@ | ||
| 170 | * |
|
| 171 | * @return false|string |
|
| 172 | */ |
|
| 173 | protected function isOpeningIsolatedDiffTag($item, $currentIsolatedDiffTag = null) |
|
| 174 | { |
|
| 175 | $tagsToMatch = $currentIsolatedDiffTag !== null |
|
| 176 | ? array($currentIsolatedDiffTag => $this->isolatedDiffTags[$currentIsolatedDiffTag]) |
|
| 177 | : $this->isolatedDiffTags; |
|
| 178 | foreach ($tagsToMatch as $key => $value) { |
|
| 179 | if (preg_match("#<".$key."[^>]*>\\s*#iU", $item)) { |
|
| 180 | return $key; |
|
| 181 | } |
|
| 182 | } |
|
| 183 | ||
| 184 | return false; |
|
| 185 | } |
|
| 186 | ||
| @@ 193-203 (lines=11) @@ | ||
| 190 | * |
|
| 191 | * @return false|string |
|
| 192 | */ |
|
| 193 | protected function isClosingIsolatedDiffTag($item, $currentIsolatedDiffTag = null) |
|
| 194 | { |
|
| 195 | $tagsToMatch = $currentIsolatedDiffTag !== null |
|
| 196 | ? array($currentIsolatedDiffTag => $this->isolatedDiffTags[$currentIsolatedDiffTag]) |
|
| 197 | : $this->isolatedDiffTags; |
|
| 198 | foreach ($tagsToMatch as $key => $value) { |
|
| 199 | if (preg_match("#</".$key."[^>]*>\\s*#iU", $item)) { |
|
| 200 | return $key; |
|
| 201 | } |
|
| 202 | } |
|
| 203 | ||
| 204 | return false; |
|
| 205 | } |
|
| 206 | ||