summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2019-03-15 22:25:17 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2019-03-15 22:25:45 +0900
commite6a258aed46c942f7810cb92f0d82dd3c6857cc7 (patch)
tree620d8417cd824973817fe9c442cef7969dbd32c9
parentc7fdf1a4e1d4ec6f4e03c62e8abce5bb45c9a3eb (diff)
downloaddeoplete.nvim-e6a258aed46c942f7810cb92f0d82dd3c6857cc7.zip
Remove snippet markers in converter_remove_paren
-rw-r--r--rplugin/python3/deoplete/filter/converter_remove_paren.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rplugin/python3/deoplete/filter/converter_remove_paren.py b/rplugin/python3/deoplete/filter/converter_remove_paren.py
index d250091..a42900e 100644
--- a/rplugin/python3/deoplete/filter/converter_remove_paren.py
+++ b/rplugin/python3/deoplete/filter/converter_remove_paren.py
@@ -16,8 +16,8 @@ class Filter(Base):
self.description = 'remove parentheses converter'
def filter(self, context):
- p = re.compile(r'\(\)?$')
for candidate in [x for x in context['candidates']
- if p.search(x['word'])]:
- candidate['word'] = re.sub(r'\(\)?$', '', candidate['word'])
+ if '(' in x['word']]:
+ candidate['word'] = re.sub(r'\(.*\)(\$\d+)?', '',
+ candidate['word'])
return context['candidates']