diff --git a/home/filter.go b/home/filter.go index ca5e4add..4b1a75ef 100644 --- a/home/filter.go +++ b/home/filter.go @@ -478,6 +478,8 @@ func (f *Filtering) parseFilterContents(file io.Reader) (int, uint32, string) { name = m[0][1] seenTitle = true } + } else if line[0] == '#' { + continue } else { rulesCount++ } diff --git a/home/filter_test.go b/home/filter_test.go index e4f10f1f..317741d8 100644 --- a/home/filter_test.go +++ b/home/filter_test.go @@ -14,6 +14,7 @@ import ( func testStartFilterListener() net.Listener { http.HandleFunc("/filters/1.txt", func(w http.ResponseWriter, r *http.Request) { content := `||example.org^$third-party +# Inline comment example ||example.com^$third-party 0.0.0.0 example.com `