Skip to content

Commit 524926d

Browse files
Added comment support for urls.list
1 parent 3504017 commit 524926d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

NotifierBot/Sources/Notifier/ConfigParser.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class ConfigParser {
2222
let config = (try? String(contentsOfFile: kURLListFile)) ?? ""
2323
var entries: [URLEntry] = []
2424
for line in config.components(separatedBy: .newlines) {
25-
if line.isEmpty {
25+
if line.trimmingCharacters(in: .whitespaces).isEmpty
26+
|| line.trimmingCharacters(in: .whitespaces).starts(with: "#") {
2627
continue
2728
}
2829
let components = line.components(separatedBy: ",")

0 commit comments

Comments
 (0)