Re: [patch] remove spurious insetexternal warning

2004-10-28 Thread Georg Baum
Angus Leeming wrote: > Georg Baum wrote: >> It seems that boost::regex is greedy, so I had to readd the "[^,]" part. >> Because of that, the "?" is also needed, but the second and third group >> are indeed unnecessary, so I have now >> >> back("^(.*[^,])?,*[]] *$"); >> >> This w

Re: [patch] remove spurious insetexternal warning

2004-10-27 Thread Angus Leeming
Georg Baum wrote: > Am Mittwoch, 27. Oktober 2004 14:02 schrieb Angus Leeming: >> static boost::regex const >> - back("^(.*[^,])(,*[]] *)$"); >> + back("^(.*[^,])?(,*)([]] *)$"); >> >> Well done... H. >> >> Are we being too intricate here? Surely this will

Re: [patch] remove spurious insetexternal warning

2004-10-27 Thread Georg Baum
Am Mittwoch, 27. Oktober 2004 14:02 schrieb Angus Leeming: > static boost::regex const > - back("^(.*[^,])(,*[]] *)$"); > + back("^(.*[^,])?(,*)([]] *)$"); > > Well done... H. > > Are we being too intricate here? Surely this will work also because > boost

Re: [patch] remove spurious insetexternal warning

2004-10-27 Thread Angus Leeming
Georg Baum wrote: >> The real problem being that the regex is insufficient for the use >> case? > > Yes. Misunderstanding on my side: what[0] is the whole match, and > not the first submatch. I altered the last regex (see attached > patch, which goes in right now). static boost::regex con

Re: [patch] remove spurious insetexternal warning

2004-10-27 Thread Georg Baum
Angus Leeming wrote: > Georg Baum wrote: >> from the external inset. sanitizeLatexOption() was called with the input >> "[,,,]". The last regex was then called with "]", and this lead to the >> warning message. A possible fix is attached. It does also fix the first >> warning message in sanitizeL

Re: [patch] remove spurious insetexternal warning

2004-10-25 Thread Georg Baum
Angus Leeming wrote: > The real problem being that the regex is insufficient for the use case? > > Looking at the code, there are three separate tests: > 1 "[,,,foo..." -> "[foo..." > 2 "foo,,,bar" -> "foo,bar" > 3 "...foo,,,]" -> ""...foo]" > it seems that your case should be

Re: [patch] remove spurious insetexternal warning

2004-10-25 Thread Angus Leeming
Georg Baum wrote: > Angus, > > while playing with your mover stuff I got the warning > > Unable to sanitize LaTeX "Option": ] > > from the external inset. sanitizeLatexOption() was called with the input > "[,,,]". The last regex was then called with "]", and this lead to the > warning message.

[patch] remove spurious insetexternal warning

2004-10-24 Thread Georg Baum
Angus, while playing with your mover stuff I got the warning Unable to sanitize LaTeX "Option": ] from the external inset. sanitizeLatexOption() was called with the input "[,,,]". The last regex was then called with "]", and this lead to the warning message. A possible fix is attached. It doe