From owner-freebsd-cvsweb@FreeBSD.ORG Thu May 1 13:24:20 2003 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 C5D2837B401 for ; Thu, 1 May 2003 13:24:20 -0700 (PDT) Received: from smtp3.pp.htv.fi (smtp3.pp.htv.fi [213.243.153.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 092B943FAF for ; Thu, 1 May 2003 13:24:20 -0700 (PDT) (envelope-from scop@FreeBSD.org) Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50]) by smtp3.pp.htv.fi (Postfix) with ESMTP id BC69027AF88 for ; Thu, 1 May 2003 23:24:18 +0300 (EEST) Received: from cs78129105.pp.htv.fi (cs78129105.pp.htv.fi [62.78.129.105]) by posti.pp.htv.fi (8.11.1/8.11.1) with ESMTP id h41KPn911315 for ; Thu, 1 May 2003 23:25:49 +0300 (EETDST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: freebsd-cvsweb@FreeBSD.org In-Reply-To: <6B1DF6EEBA51D31182F200902740436803B24F59@mail-in.comverse.com> References: <6B1DF6EEBA51D31182F200902740436803B24F59@mail-in.comverse.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: FreeBSD Message-Id: <1051820658.4054.85.camel@bobcat.ods.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 01 May 2003 23:24:18 +0300 Content-Transfer-Encoding: 8bit Subject: RE: Displaying line numbers X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list [restricted posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 20:24:21 -0000 On Thu, 2003-05-01 at 20:08, Khachaturov Vassilii wrote: > > In addition to the line numbers, there should be a > name="lXX">XX > > for all lines so that one can point to them using #lXX in URLs. Even > > agreed > > > better if the line referred to in this way would be somehow > > highlighted... > > I doubt this is possible. The #id resolution takes place at the browser > level, > the HTTP query sent to the server doesn't normally include it. Yep. I meant (but failed to note) that I was thinking about doing this in JavaScript, using window.location.hash and dynamically setting the CSS properties for the requested line from the document's onload handler. I think that would work. It might have an impact on the HTML output, possibly requiring a element around each row, or at least extending the to enclose the whole row in order to be simply able to access one object and set its properties. By the way, is there a function/ perl module for getting the number of lines in a file? `wc -l` of course works... I think that would be needed in order to get the line numbers properly left padded with spaces like in 1 [...] 100 [...] Oh, and I have some doubts whether it'll be possible to have the line numbers with the new Enscript-formatted output... need to check it out. We output it line by line so in case enscript emits one line of HTML per one line of source, it could be trivial. -- \/ille Skyttä scop at FreeBSD.org