Fix getThirdPartyExtensions of SDK when extracting from README shipped with npm package (#8564)

This commit is contained in:
Álvaro Mondéjar 2023-04-24 17:06:05 +02:00 committed by GitHub
parent 7b3f27136f
commit eb90e446e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,9 +196,9 @@ export const getThirdPartyExtensions = async (
let [module, author] = line.split(' | ');
// README shipped with package has not Github theme image links
module = module.includes('<picture>')
? module.split('<picture>')[0]
: module.split('<img src="')[1].split(' ').slice(5).join(' ');
module = module.split(
module.includes('<picture>') ? '<picture>' : '<img src="',
)[0];
return {
module: {
name: /\[(.+)\]/.exec(module)[1],