fix_clashprovider_test

This commit is contained in:
makabaka
2024-01-18 15:09:24 +08:00
parent 23a0857bcf
commit b20effb4ec

View File

@@ -8,7 +8,7 @@ function HTML() {
function ClashProvider() {
const name = 'Clash Provider';
const test = (raw) => raw.indexOf('payload:') === 0;
const test = (raw) => /^payload:/gm.exec(raw).index >= 0;
const parse = (raw) => {
return raw.replace('payload:', '').replace(/^\s*-\s*/gm, '');
};