From owner-freebsd-questions Tue Jun 11 23:21:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from lexx.zssm.zp.ua (lexx.zssm.zp.ua [212.8.32.8]) by hub.freebsd.org (Postfix) with ESMTP id 4CC9537B407 for ; Tue, 11 Jun 2002 23:21:12 -0700 (PDT) Received: from server.hermes-comp.zp.ua (germes-comp.zssm.zp.ua [212.8.32.132] (may be forged)) by lexx.zssm.zp.ua (8.9.2/8.9.2) with ESMTP id JAA18218; Wed, 12 Jun 2002 09:15:13 +0300 (EET DST) Received: from localhost (localhost [127.0.0.1]) by server.hermes-comp.zp.ua (Postfix) with ESMTP id 9D7CB38302; Wed, 12 Jun 2002 09:11:00 +0300 (EEST) Date: Wed, 12 Jun 2002 09:11:00 +0300 (EEST) From: Alexander V Zubchenko To: Jacob Rhoden Cc: Subject: Re: OT: Javascript source code formatting In-Reply-To: <5.1.1.6.0.20020612160834.00bbbe30@mail.iprimus.com.au> Message-ID: <20020612090635.W92467-100000@server.hermes-comp.zp.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greetings! On Wed, 12 Jun 2002, Jacob Rhoden wrote: > >What You mean under formatting (just indentation or something more, > >like capitals in variable name or so)? > > Unfortunately its not that simple, braces have moved lines, and the number > of spaces in front of each line has changed as well (by 2,3 or 4 spaces - > *sigh*). Number of spaces is not a problem. Use regexp's (like '^[]*'). But with lines it is not a formatting. The way i see is similar to 'compile and check result'. I don't know how to achieve this with js, sorry. But, if You provide some examples, i'll try to solve it. Alexander V Zubchenko, E-Mail: stalker@hermes-comp.zp.ua System Administrator, WWW: http://www.hermes-comp.zp.ua/ Hermes-comp, Ukraine, Zaporizhzhya, Geroev Stalingrada 50 phone/fax: +380 612 64-19-72 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message