Merge pull request #273 from izhangxm/master

修复clash规则头部有注释的情况下规则转换功能失败的问题
This commit is contained in:
xream authored and GitHub committed 2024-01-18 17:07:59 +08:00
commit 9da9419155
1 file changed
+1 -1
+1 -1
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, '');
};