Show More
@@ -14,7 +14,6 b' from __future__ import print_function' | |||||
14 |
|
14 | |||
15 | # Stdlib imports |
|
15 | # Stdlib imports | |
16 | import subprocess |
|
16 | import subprocess | |
17 | import re |
|
|||
18 | import warnings |
|
17 | import warnings | |
19 | from io import TextIOWrapper, BytesIO |
|
18 | from io import TextIOWrapper, BytesIO | |
20 |
|
19 | |||
@@ -87,9 +86,11 b' def get_pandoc_version():' | |||||
87 | if not is_cmd_found('pandoc'): |
|
86 | if not is_cmd_found('pandoc'): | |
88 | raise PandocMissing() |
|
87 | raise PandocMissing() | |
89 |
|
88 | |||
90 |
out = subprocess.check_output( |
|
89 | out = subprocess.check_output(['pandoc', '-v'], | |
91 | pv_re = re.compile(r'(\d{0,3}\.\d{0,3}\.\d{0,3})') |
|
90 | universal_newlines=True) | |
92 | __version = pv_re.search(out).group(0) |
|
91 | out_lines = out.splitlines() | |
|
92 | pandoc_line = out_lines[0] | |||
|
93 | __version = pandoc_line.lstrip("pandoc ") | |||
93 | return __version |
|
94 | return __version | |
94 |
|
95 | |||
95 |
|
96 |
General Comments 0
You need to be logged in to leave comments.
Login now