Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

tvim: Support end marker in strings

  • Loading branch information...
commit bcc92cb86c7897b4e5f334865ecee23fd70f3e59 1 parent cf5183b
Tom Link authored December 07, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  autoload/templator/expander/tvim.vim
4  autoload/templator/expander/tvim.vim
... ...
@@ -1,7 +1,7 @@
1 1
 " @Author:      Tom Link (mailto:micathom AT gmail com?subject=[vim])
2 2
 " @License:     GPL (see http://www.gnu.org/licenses/gpl.txt)
3 3
 " @Last Change: 2012-12-06.
4  
-" @Revision:    54
  4
+" @Revision:    59
5 5
 
6 6
 " :doc:
7 7
 "                                                   *templator-tvim*
@@ -32,7 +32,7 @@ endf
32 32
 
33 33
 function! templator#expander#tvim#Expand() "{{{3
34 34
     let text = join(getline(1, '$'), "\n")
35  
-    let text = substitute(text, '<?vim\_s\+\(\_.\{-}\)\_s*?>', '\=s:Replace(submatch(1))', 'g')
  35
+    let text = substitute(text, '<?vim\_s\+\(\(\_[^''"?]\+\|''\_[^'']*''\|"\([^"]*\n\|\_[^"]*"\)\)\{-}\)\_s*?>', '\=s:Replace(submatch(1))', 'g')
36 36
     " TLogVAR text
37 37
     let lines = split(text, '
\|\n')
38 38
     1,$delete

0 notes on commit bcc92cb

Please sign in to comment.
Something went wrong with that request. Please try again.