Skip to content

Commit

Permalink
Fix regex to capture optional long options
Browse files Browse the repository at this point in the history
  • Loading branch information
kdm9 committed Sep 7, 2016
1 parent 3f5fd61 commit e8050c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pythonx/vim_pandoc/command.py
Expand Up @@ -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():
Expand Down

0 comments on commit e8050c9

Please sign in to comment.