Skip to content

Commit

Permalink
BlueScreen: highlightLine() produces extra </code>
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 25, 2023
1 parent 976942b commit aa2fb22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tracy/BlueScreen/BlueScreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public static function highlightPhp(string $source, int $line, int $lines = 15,
$out = $source[0]; // <code><span color=highlight.html>
$source = str_replace('<br />', "\n", $source[1]);
$out .= static::highlightLine($source, $line, $lines, $column);
$out = str_replace('&nbsp;', ' ', $out);
$out = str_replace('&nbsp;', ' ', $out) . '</code>';
return "<pre class='tracy-code'><div>$out</div></pre>";
}

Expand Down Expand Up @@ -412,7 +412,7 @@ public static function highlightLine(string $html, int $line, int $lines = 15, i
}
}

$out .= str_repeat('</span>', $spans) . '</code>';
$out .= str_repeat('</span>', $spans);
return $out;
}

Expand Down

0 comments on commit aa2fb22

Please sign in to comment.