Re: small errors in the CSS2.1 grammar

> Bert Bos writes:
> > Lars Knoll writes:
> > > My version of flex doesn't seem to handle the comment specification
> > > correctly (the end of comments as eg "/***/" are not recognised for
> > > some reason), although the expression looks correct to me:
> > >
> > > \/\*[^*]*\*+([^/][^*]*\*+)*\/   /* ignore comments */
> > >
> > > In khtml, I've gone back to the CSS1 grammar for the definition of
> > > comments.
> >
> > They are supposed to be equivalent, so that should be OK.
> >
> > I'll try to find out why the pattern doesn't work. I'll change the
> > pattern in CSS 2.1, if needed.
>
> The error was that the middle [^/] could match the third *. It works
> when you change the pattern to this:
>
>     \/\*[^*]*\*+([^/*][^*]*\*+)*\/

That seems to fix the problem :)

Thanks,
Lars

Received on Thursday, 16 January 2003 04:30:50 UTC