Make indented blocks work
authorGreg Hurrell <greg@hurrell.net>
Thu, 30 Jul 2015 04:38:43 +0000 (21:38 -0700)
committerGreg Hurrell <greg@hurrell.net>
Thu, 30 Jul 2015 04:38:43 +0000 (21:38 -0700)
We were misdetecting the end of the docblock because our `end` regex
could match lines like:

    <space><space>"

(ie. a 0 or 1-width space, followed by a non-quote)

Fix that by looking for non-space, non-tab, non-quote instead.

Also, use "\s" for whitespace, so that we deal with tabs properly as
well as spaces.

after/syntax/vim.vim

index 5c89ff40460d336cbf011a1bc78385025ffb351b..fc8063785c75873e077c6ff3823a646075d0a66b 100644 (file)
 "
 " - Initial release.
 
-syntax region docvimBlock start='\v^ *""' end='\v\zs\ze^( *$|[^"])'
+syntax region docvimBlock start='\v^\s*""' end='\v^\zs\ze\s*($|[^ \t"])'
 syntax region docvimPre start='\v^\s*"\s+\zs```\s*$' end='\v^\s*"\s+```\s*$' containedin=docvimBlock contained keepend
 
 syntax match docvimAnnotation '@command' containedin=docvimBlock contained