From e8050c97b96eb0f3bdaacdba0cef7c768d3a3b5f Mon Sep 17 00:00:00 2001 From: Kevin Murray Date: Wed, 7 Sep 2016 14:35:57 +1000 Subject: [PATCH] Fix regex to capture optional long options --- pythonx/vim_pandoc/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonx/vim_pandoc/command.py b/pythonx/vim_pandoc/command.py index e4b9256..d4040e7 100644 --- a/pythonx/vim_pandoc/command.py +++ b/pythonx/vim_pandoc/command.py @@ -86,7 +86,7 @@ def get_longopts(): data = str(Popen(["pandoc", "--help"], stdout=PIPE).communicate()[0]) return map(lambda i: i.replace("--", ""), \ filter(lambda i: i not in ("--version", "--help", "--to", "--write"), \ - [ i.group() for i in re.finditer("-(-\w+)+=?", data)])) + [ ''.join(i.groups()) for i in re.finditer("--([-\w]+)+\[?(=?)\w*\]?", data)])) @staticmethod def get_shortopts():