浏览代码

Chore: slice comment out for iteration

SukkaW 7 月之前
父节点
当前提交
4ec00aaa1b
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Build/lib/run-against-source-file.ts

+ 6 - 0
Build/lib/run-against-source-file.ts

@@ -15,6 +15,12 @@ export default async function runAgainstSourceFile(
     if (!l) {
       continue;
     }
+    const otherPoundSign = l.lastIndexOf('#');
+
+    if (otherPoundSign > 0) {
+      l = l.slice(0, otherPoundSign).trimEnd();
+    }
+
     if (type == null) {
       if (l.includes(',')) {
         type = 'ruleset';