ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dun...@sapio.co.uk (Duncan Harris)
Subject Re: JavaScript comment stripping Task
Date Thu, 01 Jan 1970 00:00:00 GMT
umagesh@apache.org (Magesh Umasankar) wrote:

> In Ant's CVS tree (1.5Alpha), I have recently
> committed a set of FilterReaders.  Please take
> a look at it.  IMHO, your task must instead be
> implemented as a filterreader that can be
> passed to multiple tasks like <copy>, <move>,
> <loadfile>, etc.

I had a look at the docs for this.
I could see how to convert this to a custom filter.

I see you already have one for Java comment stripping.
The JavaScript one presumably very similar, though not
quite the same. However I looked at the code for StripJavaComments
as an example and it is wrong, e.g. k=a/b converts to k=ab

What about doing it with a regexp though?
Is there any way to use a general regexp substitution
as a filter? I couldn't see how off hand. It needs to
be whole file substitute, not line by line.

Duncan Harris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hartford, Cheshire, U.K., Tel: 07968 060418

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message