From owner-freebsd-cvsweb@FreeBSD.ORG Sat Jan 8 17:07:12 2005 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E828E16A4CE for ; Sat, 8 Jan 2005 17:07:12 +0000 (GMT) Received: from smtp1.pp.htv.fi (smtp1.pp.htv.fi [213.243.153.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0C0943D31 for ; Sat, 8 Jan 2005 17:07:12 +0000 (GMT) (envelope-from scop@FreeBSD.org) Received: from cs78128192.pp.htv.fi (cs78128192.pp.htv.fi [62.78.128.192]) by smtp1.pp.htv.fi (Postfix) with ESMTP id BB39780510 for ; Sat, 8 Jan 2005 19:06:55 +0200 (EET) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: freebsd-cvsweb@freebsd.org In-Reply-To: <20050107082051.0C563282BF0@shodan.ibl.sk> References: <20050107082051.0C563282BF0@shodan.ibl.sk> Content-Type: text/plain Organization: FreeBSD Date: Sat, 08 Jan 2005 19:06:55 +0200 Message-Id: <1105204015.5066.1.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit Subject: Re: Bug: CVSweb 3.0.4 X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jan 2005 17:07:13 -0000 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!