fix: handle raw statement for pep440 pre-release

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-12-06 17:15:06 +01:00
parent 6d7c94a41e
commit aad230bbd9
5 changed files with 74 additions and 8 deletions

View File

@ -175,7 +175,11 @@ export class Meta {
let latest: boolean = false;
const pver = pep440.explain(vraw);
if (pver.is_prerelease || pver.is_postrelease || pver.is_devrelease) {
vraw = this.setValue(pep440.clean(vraw), tag);
if (Meta.isRawStatement(tag.attrs['pattern'])) {
vraw = this.setValue(vraw, tag);
} else {
vraw = this.setValue(pep440.clean(vraw), tag);
}
} else {
vraw = this.setValue(
handlebars.compile(tag.attrs['pattern'])({