message: feat: add quantumultx filter
diff: @@ -14,8 +14,8 @@ export default function getEngine(templateDir: string): nunjucks.Environment {
  return array
  .filter(item => {
  return item && item.trim() !== '' &&
  - item.indexOf('USER-AGENT') === -1 &&
  - item.indexOf('PROCESS-NAME') === -1;
  + item.toUpperCase().indexOf('USER-AGENT') === -1 &&
  + item.toUpperCase().indexOf('PROCESS-NAME') === -1;
  })
  .map((item: string) => {
  if (item.startsWith('#')) {
  @@ -29,6 +29,18 @@ export default function getEngine(templateDir: string): nunjucks.Environment {
  .join('\n');
  });
  + engine.addFilter('quantumultx', (str: string) => {
  + const array = str.split('\n');
  +
  + return array
  + .filter(item => {
  + return item && item.trim() !== '' &&
  + item.toUpperCase().indexOf('URL-REGEX') === -1 &&
  + item.toUpperCase().indexOf('PROCESS-NAME') === -1;
  + })
  + .join('\n');
  + });
  +
  // istanbul ignore next
  engine.addFilter('yaml', (obj: JsonObject) => YAML.stringify(obj));
  