badgen.net
badgen.net copied to clipboard
License name of Dart packages are incorrectly shown
In Dart pub section of the website, version name has some additional HTML in it. E.g.:
I think the issue comes from regex on line 105 of the /api/pub.ts
file since the HTML of the parsed webpage has changed:
https://github.com/badgen/badgen.net/blob/fea19e03ce31204277b0f252ad9268178fe00aa7/api/pub.ts#L103-L107
It might be fixed by updating the regex with /License<\/h3>\s*<p>[^>]+>([^(]+)\(/i
:
- const license = html.match(/License<\/h3>\s*<p>([^(]+)\(/i)?.[1].trim()
+ const license = html.match(/License<\/h3>\s*<p>[^>]+>([^(]+)\(/i)?.[1].trim()