The line starts with 'class' is considered as first line.

This commit is contained in:
2025-03-25 16:18:43 +08:00
parent ba8831caa6
commit 1b4f67b314

View File

@@ -82,7 +82,7 @@ class ComicSourceParser {
js = js.replaceAll("\r\n", "\n"); js = js.replaceAll("\r\n", "\n");
var line1 = js var line1 = js
.split('\n') .split('\n')
.firstWhereOrNull((element) => element.removeAllBlank.isNotEmpty); .firstWhereOrNull((e) => e.trim().startsWith("class "));
if (line1 == null || if (line1 == null ||
!line1.startsWith("class ") || !line1.startsWith("class ") ||
!line1.contains("extends ComicSource")) { !line1.contains("extends ComicSource")) {