优化
This commit is contained in:
@@ -5,7 +5,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url'
|
||||
export const repositoryRoot = path.resolve(fileURLToPath(new URL('..', import.meta.url)))
|
||||
|
||||
const normalize = (value) => value.replaceAll('\\', '/')
|
||||
const attribute = (source, name) => source.match(new RegExp(`\\b${name}="([^"]*)"`))?.[1]
|
||||
const attribute = (source, name) => source.match(new RegExp(`\\b${name}=(?:"([^"]*)"|'([^']*)')`))?.slice(1).find((value) => value !== undefined)
|
||||
|
||||
async function exists(file) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user