On Thursday, July 18, 2013 3:15:22 PM UTC-5, Marcin Szamotulski wrote:
> On 11:15 Thu 18 Jul     , studog wrote:
> 
> > This morning I noticed that the svn syntax file isn't quite correct; in a 
> > few places the regex
> 
> > ^--.*--$
> 
> > is used to find the commit message delimiter.
> 
> > 
> 
> > I checked the source code for svn 1.8.0 and the delimiter is exactly
> 
> > --This line, and those below, will be ignored--
> 
> > or its localized form.
> 
> 
> 
> Writting a pattern which has to match all the languages is not the best
> 
> idea.  But maybe refining the pattern would help:
> 
> 
> 
> ^--[a-zA-Z ,^-]\{-}--$
> 
> 
> 
> Or something of this sort.
> 

But then if the localized form contains any accents or other non-ASCII 
characters, it won't match. And perhaps (I don't know) there might even be 
localized messages with completely foreign scripts. I don't think you can do 
much better than .\+. Maybe you could at least disallow more than two '-' 
characters at the beginning and end and require SOMETHING between the -- 
characters:

^---\@!.*-\@!.--$

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to