Fixes #1030. Add support for alpha versions of autopep8

See https://github.com/Glavin001/atom-beautify/issues/1030#issuecomment-309371093
This commit is contained in:
Glavin Wiechert 2017-06-20 00:39:14 -03:00
parent 6db34cd9d8
commit dc1b66d1b9
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# Next
- Fixes [#1030](https://github.com/Glavin001/atom-beautify/issues/1030). Add support for alpha versions of autopep8
- Fixes [#1725](https://github.com/Glavin001/atom-beautify/issues/1725). Fix version parsing of PHP executable
- Fixes [#1730](https://github.com/Glavin001/atom-beautify/issues/1730). Correctly parse PHPCBF version and improve handling of Executable
- ...

View File

@ -16,7 +16,11 @@ module.exports = class Autopep8 extends Beautifier
homepage: "https://github.com/hhatto/autopep8"
installation: "https://github.com/hhatto/autopep8#installation"
version: {
parse: (text) -> text.match(/autopep8 (\d+\.\d+\.\d+)/)[1]
parse: (text) ->
try
text.match(/autopep8 (\d+\.\d+\.\d+)/)[1]
catch
text.match(/autopep8 (\d+\.\d+)/)[1] + ".0"
runOptions: {
returnStdoutOrStderr: true
}