mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 19:31:45 +03:00
Merge: * filter: skip comment lines starting with '#'
* commit 'b034e25b26ec01c8b2607726646c55777ba66a1d': * filter: skip comment lines starting with '#'
This commit is contained in:
commit
6d136ee2cb
@ -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++
|
||||
}
|
||||
|
@ -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
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user