On 14:49 Thu 18 Jul     , Ben Fritz wrote:
> 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:
> 
> ^---\@!.*-\@!.--$
> 

Indeed.  There might be a way though by using ":help \[==]", but
I haven't used these patterns much.

Best,
Marcin

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui