geshi-1.0
geshi-1.0 copied to clipboard
PHP: wrong style on extra highlighted lines
example:
<?php
require_once 'geshi.php';
$content = <<<CODE
01st line
02nd line
03rd line
04th line
05th line
06th line
07th line
08th line
09th line
10th line
11th line
12th line
CODE;
$geshi = new GeSHi($content, 'text');
$geshi->highlight_lines_extra(1, 'background-color:red');
$geshi->highlight_lines_extra(3, 'background-color:red');
$geshi->highlight_lines_extra(4, 'background-color:red');
$geshi->highlight_lines_extra(6, 'background-color:red');
$geshi->highlight_lines_extra(7, 'background-color:red');
$geshi->highlight_lines_extra(8, 'background-color:red');
$geshi->highlight_lines_extra(10, 'background-color:red');
echo $geshi->parse_code();
solution: add '+1' in lines 4007 and 4055 (geshi.php 1.0.8.11)
ah, and BTW: The second parameter is not documented …
I'd be grateful if you could provide a patch / pull request.