mirror of
https://github.com/jiangmiao/auto-pairs.git
synced 2025-04-21 20:18:48 +08:00
Fix #238 doule quote closing broken
This commit is contained in:
parent
a5142b0e99
commit
67b3606bb7
@ -190,6 +190,7 @@ func! AutoPairsInsert(key)
|
||||
" check open pairs
|
||||
for [open, close, opt] in b:AutoPairsList
|
||||
let ms = s:matchend(before.a:key, open)
|
||||
let m = matchstr(afterline, '^\v\s*\V'.close)
|
||||
if len(ms) > 0
|
||||
" process the open pair
|
||||
|
||||
@ -198,6 +199,9 @@ func! AutoPairsInsert(key)
|
||||
" when <!-- is detected the inserted pair < > should be clean up
|
||||
let target = ms[1]
|
||||
let openPair = ms[2]
|
||||
if len(openPair) == 1 && m == openPair
|
||||
break
|
||||
end
|
||||
let bs = ''
|
||||
let del = ''
|
||||
while len(before) > len(target)
|
||||
|
Loading…
x
Reference in New Issue
Block a user