Date: Sat, 08 Jan 2005 19:06:55 +0200 From: Ville =?ISO-8859-1?Q?Skytt=E4?= <scop@FreeBSD.org> To: freebsd-cvsweb@freebsd.org Subject: Re: Bug: CVSweb 3.0.4 Message-ID: <1105204015.5066.1.camel@bobcat.mine.nu> In-Reply-To: <20050107082051.0C563282BF0@shodan.ibl.sk> References: <20050107082051.0C563282BF0@shodan.ibl.sk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2005-01-07 at 09:20 +0100, Vlado Klimovsky wrote: > Hello, > > there seems to be a bug in the 3.0.4 version of the CVSweb script. Please > see the spacedHtmlText() function, line 1585, which reads: > > 1 while s/(.*)(\t+)/$1 . ' ' x (length($2) * $ts - length($1) % $ts)/e; > > The problem is in the '(.*)' subexpression; by default the '*' match > specifier is greedy so the regular expression '(\t+)' will match the LAST > sequence of tabs on the string, not the first one. For this reason the tabs > are expanded into an incorrect number of spaces. I changed the line like > this: > > 1 while s/(.*?)(\t+)/$1 . ' ' x (length($2) * $ts - length($1) % $ts)/e; > > and the problem seems to be solved. Applied, this will be in 3.0.5. Thanks!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1105204015.5066.1.camel>