Closed (fixed)
Project:
GeSHi Filter for syntax highlighting
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Sep 2007 at 14:11 UTC
Updated:
6 Oct 2007 at 13:01 UTC
The whitespace of the first line is trimmed
e.g. input:
int a;
int b;
int c;
is rendered as
int a;
int b;
int c;
Comments
Comment #1
soxofaan commentedpartially solved by http://drupal.org/cvs?commit=80993
problem still occurs when div is used as code container, but this seems a bug in GeSHi at first sight:
input (underscores represent spaces):
rendered result (underscores represent spaces):
in pseudo html (underscores represent spaces):
Comment #2
soxofaan commentedAfter some research, this is indeed a bug in GeSHi
reported at http://sourceforge.net/tracker/index.php?func=detail&aid=1800170&group_i...
solution:
change line change line 1983 of geshi.php (version 1.0.7.20) from
$result = str_replace("\n ", "\n ", $result);to
$result = preg_replace('/^ /m', ' ', $result);Comment #3
(not verified) commented