Fix #2597. Regex expected different version string than it received.

This commit is contained in:
Doeke 2022-05-27 16:13:07 -04:00
parent 41d5051b39
commit bffd123a26
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,10 @@ module.exports = class Black extends Beautifier
try
text.match(/black, version (\d+\.\d+)/)[1] + "." + text.match(/b(\d+)$/)[1]
catch
text.match(/black, version (\d+\.\d+)/)[1] + ".0"
try
text.match(/black, version (\d+\.\d+)/)[1] + ".0"
catch
text.match(/black, (\d+\.\d+\.\d+)/)[1]
}
}
]