| @@ 14-20 (lines=7) @@ | ||
| 11 | $source = $r->source; |
|
| 12 | ||
| 13 | // Trim empty lines from the start and end of the source |
|
| 14 | foreach ($source as $linenum => $line) { |
|
| 15 | if (trim($line) || $linenum === $r->line) { |
|
| 16 | break; |
|
| 17 | } else { |
|
| 18 | unset($source[$linenum]); |
|
| 19 | } |
|
| 20 | } |
|
| 21 | ||
| 22 | foreach (array_reverse($source, true) as $linenum => $line) { |
|
| 23 | if (trim($line) || $linenum === $r->line) { |
|
| @@ 22-28 (lines=7) @@ | ||
| 19 | } |
|
| 20 | } |
|
| 21 | ||
| 22 | foreach (array_reverse($source, true) as $linenum => $line) { |
|
| 23 | if (trim($line) || $linenum === $r->line) { |
|
| 24 | break; |
|
| 25 | } else { |
|
| 26 | unset($source[$linenum]); |
|
| 27 | } |
|
| 28 | } |
|
| 29 | ||
| 30 | $start = ''; |
|
| 31 | $highlight = ''; |
|